<Folder Include="src\Editors\CodeBuffer\" />
<Folder Include="src\ProjectTree\" />
<Folder Include="src\Editors\Parsers2\" />
+ <Folder Include="src\ProjectTree\msbuild\" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="images\save.svg" />
{
class CrowIDE : Interface
{
- static bool running = true;
-
public Command CMDNew, CMDOpen, CMDSave, CMDSaveAs, cmdCloseSolution, CMDQuit,
CMDUndo, CMDRedo, CMDCut, CMDCopy, CMDPaste, CMDHelp,
CMDAbout, CMDOptions,
CMDOpen = new Command(new Action(() => openFileDialog())) { Caption = "Open...", Icon = new SvgPicture("#Crow.Coding.icons.open.svg")};
CMDSave = new Command(new Action(() => saveFileDialog())) { Caption = "Save", Icon = new SvgPicture("#Crow.Coding.icons.save.svg"), CanExecute = false};
CMDSaveAs = new Command(new Action(() => saveFileDialog())) { Caption = "Save As...", Icon = new SvgPicture("#Crow.Coding.icons.save.svg"), CanExecute = false};
- CMDQuit = new Command(new Action(() => running = false)) { Caption = "Quit", Icon = new SvgPicture("#Crow.Coding.ui.icons.sign-out.svg")};
+ CMDQuit = new Command(new Action(() => app.running = false)) { Caption = "Quit", Icon = new SvgPicture("#Crow.Coding.ui.icons.sign-out.svg")};
CMDUndo = new Command(new Action(() => undo())) { Caption = "Undo", Icon = new SvgPicture("#Crow.Coding.icons.undo.svg"), CanExecute = false};
CMDRedo = new Command(new Action(() => redo())) { Caption = "Redo", Icon = new SvgPicture("#Crow.Coding.icons.redo.svg"), CanExecute = false};
//CMDCut = new Command(new Action(() => Quit (null, null))) { Caption = "Cut", Icon = new SvgPicture("#Crow.Coding.icons.scissors.svg"), CanExecute = false};
public void saveWinConfigs() {
Configuration.Global.Set ("WinConfigs", mainDock.ExportConfig ());
+ Configuration.Global.Save ();
}
public void reloadWinConfigs() {
string conf = Configuration.Global.Get<string>("WinConfigs");
app.reloadWinConfigs ();
- while (running) {
- app.ProcessEvents ();
- //Thread.Sleep(1);
- }
+ app.Run ();
app.saveWinConfigs ();
- Thread.Sleep (500);
}
}
}
}
}
- [DefaultValue("BlueGrey")]
+ [DefaultValue("Blue")]
public virtual Color SelectionBackground {
get { return selBackground; }
set {
{ Caption = "Save As ..", Icon = new SvgPicture ("#Crow.Coding.icons.save.svg"), CanExecute = false };
cmdOpen = new Crow.Command (new Action (() => Open ()))
{ Caption = "Open", Icon = new SvgPicture ("#Crow.Coding.icons.open.svg"), CanExecute = true };
- cmdClose = new Crow.Command (new Action (() => Close ()))
+ cmdClose = new Crow.Command (new Action (() => OnQueryClose (this,null)))
{ Caption = "Close", Icon = new SvgPicture ("#Crow.Coding.icons.open.svg"), CanExecute = false };
cmdUndo = new Crow.Command (new Action (() => Undo (null)))
{ Caption = "Undo", Icon = new SvgPicture ("#Crow.Coding.icons.undo.svg"), CanExecute = false };
NotifyValueChanged ("IsOpened", isOpened);
}
}
+
public void UnregisterEditor (object editor){
lock(RegisteredEditors){
RegisteredEditors.Remove (editor);
TreeItemBorder {
CornerRadius="2";
Margin="0";
- Focusable="true";
+ //Focusable="true";
Height="Fit";
Width="Stretched";
Foreground="Transparent";
</Border>
</ItemTemplate>
<ItemTemplate DataType="Crow.Coding.Project" Data="RootItems" DataTest="Type">
- <Expandable Caption="{Name}" ContextCommands="{Commands}" IsExpanded="{²IsExpanded}">
+ <Expandable Caption="{Name}" ContextCommands="{Commands}" IsExpanded="{²IsExpanded}" MouseDoubleClick="/onClickForExpand">
<Template>
<VerticalStack>
- <Border Style="TreeItemBorder" Focusable="true" MouseDoubleClick="./onClickForExpand">
+ <Border Style="TreeItemBorder" >
<HorizontalStack Spacing="1">
<Image Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
Path="{./Image}"
Path="#Crow.Icons.crowproj.svg"/>
<GraphicObject Width="4" Height="9" Background="Green" Visible="{IsStartupProject}"/>
<Label Text="{./Caption}"/>
+ <Label Text="{./Caption}" Visible="{IsStartupProject}" Font="mono bold, 12"/>
</HorizontalStack>
</Border>
<Container Name="Content" Visible="false"/>
app.CMDTest = new Command(new Action(() => app.AddWidget (app.instFileDlg.CreateInstance()).DataSource = app)) { Caption = "Test", Icon = new SvgPicture("#Tests.image.blank-file.svg"), CanExecute = true};
//app.AddWidget (@"Interfaces/Divers/testFocus.crow").DataSource = app;
//app.AddWidget (@"Interfaces/Divers/testMenu.crow").DataSource = app;
- app.AddWidget (@"Interfaces/Divers/testVisibility.crow").DataSource = app;
+ //app.AddWidget (@"Interfaces/Divers/testVisibility.crow").DataSource = app;
//app.AddWidget (@"Interfaces/Divers/0.crow").DataSource = app;
//app.AddWidget (@"Interfaces/Splitter/1.crow").DataSource = app;
- //app.AddWidget (@"Interfaces/Container/0.crow").DataSource = app;
+ app.AddWidget (@"Interfaces/GraphicObject/0.crow").DataSource = app;
//app.AddWidget (@"Interfaces/TemplatedContainer/test_Listbox.crow").DataSource = app;
- app.instFileDlg = Crow.IML.Instantiator.CreateFromImlFragment
- (app, "<FileDialog Caption='Open File' CurrentDirectory='{²CurrentDirectory}'/>");
+ /*app.instFileDlg = Crow.IML.Instantiator.CreateFromImlFragment
+ (app, "<FileDialog Caption='Open File' CurrentDirectory='{²CurrentDirectory}'/>");*/
//app.AddWidget (@"Interfaces/Divers/colorPicker.crow").DataSource = app;
<?xml version="1.0"?>
-<GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="SeaGreen"
- MinimumSize="50,50"/>
\ No newline at end of file
+<GraphicObject Background="SeaGreen"/>
\ No newline at end of file
}
void savingThread(){
while(true){
- if (isDirty) {
- save ();
- isDirty = false;
- }
+ if (isDirty)
+ Save ();
Thread.Sleep (100);
}
}
items[key].Set (value);
isDirty = true;
}
- void save(){
+ public void Save(){
using (Stream s = new FileStream(configPath,FileMode.Create)){
using (StreamWriter sw = new StreamWriter (s)) {
lock (items) {
}
}
}
+ isDirty = false;
}
void load(Stream s){
using (StreamReader sr = new StreamReader (s)) {
protected TextExtents te;
#endregion
+
[XmlAttributeAttribute][DefaultValue("SteelBlue")]
public virtual Color SelectionBackground {
get { return selBackground; }
{
if (!base.PointIsIn (ref m))
return false;
-
+ if (tview == null)//double check this, just added to prevent exception
+ return false;
if (m.Y < tview.TabHeight)
return TabTitle.Slot.ContainsOrIsEqual (m);
else
Keyboard.KeyUp += Keyboard_KeyUp;
Keyboard.KeyPress += Keyboard_KeyPress;
- /*initTooltip ();
- initContextMenus ();*/
+ initTooltip ();
+ initContextMenus ();
running = true;
t.IsBackground = true;
t.Start ();
}
-
+ public void Run () {
+ while (running) {
+ ProcessEvents ();
+ Thread.Sleep(1);
+ }
+ }
void Keyboard_KeyPress (object sender, KeyPressEventArgs e)
{
if (_focusedWidget != null)
#endregion
#region operators
- public static implicit operator Rectangle(System.Drawing.Rectangle r)
- {
- return new Rectangle(r.X, r.Y, r.Width, r.Height);
- }
- public static implicit operator System.Drawing.Rectangle(Rectangle r)
- {
- return new System.Drawing.Rectangle(r.X, r.Y, r.Width, r.Height);
- }
public static Rectangle operator +(Rectangle r1, Rectangle r2)
{
int x = Math.Min(r1.X, r2.X);