Example #1
0
        public DilicomForm()
        {
            InitializeComponent();
            NetworkInterface.Browser = MyWebBrowser;



            // Initial connection to Dilicom.
            setOpsTabsEnableStatus(false);
            MainTabs.SelectTab(NavigoTab);
            startConnect();
        }
Example #2
0
        private void LeftMenu_AfterSelect(object sender, TreeViewEventArgs e)
        {
            if (e.Node.Name == "EOD")
            {
                TabPage myTabPage     = new TabPage("סוף יום");
                EOD     myUserControl = new EOD();
                myUserControl.TopLevel = false;
                //myUserControl.Dock = DockStyle.Fill;
                myUserControl.Show();
                myTabPage.Controls.Add(myUserControl);
                MainTabs.TabPages.Add(myTabPage);
                myTabPage.Select();
            }

            if (e.Node.Name == "ItemQuery")
            {
                TabPage   myTabPage     = new TabPage("תיחקור פריט דינמי");
                ItemQuery myUserControl = new ItemQuery();
                myUserControl.TopLevel = false;
                //myUserControl.Dock = DockStyle.Fill;
                myUserControl.Show();
                myTabPage.Controls.Add(myUserControl);
                MainTabs.TabPages.Add(myTabPage);
                MainTabs.Select();
                MainTabs.SelectTab(1);
            }
            if (e.Node.Name == "Promotions")
            {
                TabPage    myTabPage     = new TabPage("הגדרות מבצעים");
                Promotions myUserControl = new Promotions();
                myUserControl.TopLevel = false;
                //myUserControl.Dock = DockStyle.Fill;
                myUserControl.Show();
                myTabPage.Controls.Add(myUserControl);
                MainTabs.TabPages.Add(myTabPage);
                MainTabs.Select();
                MainTabs.SelectTab(1);
            }

            if (e.Node.Name == "InventoryBrowser")
            {
                TabPage          myTabPage     = new TabPage("תיחקור מלאי דנמי");
                InventoryBrowser myUserControl = new InventoryBrowser();
                myUserControl.TopLevel = false;
                //myUserControl.Dock = DockStyle.Fill;
                myUserControl.Show();
                myTabPage.Controls.Add(myUserControl);
                MainTabs.TabPages.Add(myTabPage);
                MainTabs.Select();
                MainTabs.SelectTab(1);
            }
        }
Example #3
0
        private void GenerateCodeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form FormControl = RecursivelyGetFormControl(this.BaseSplit.Panel2);

            if (FormControl == null)
            {
                return;
            }
            try
            {
                string Xml = ModUiTools.XmlFromFormControl(FormControl);
                ModCodeAndControlHolder Code = ModUiTools.XmlToCode(Xml);
                XmlOutRTB.Text = Code.XmlCode;
                PyOutRTB.Text  = Code.PyCode;
                RbOutRTB.Text  = Code.RbCode;
                MainTabs.SelectTab("CodeTab");
            }
            catch (Exception Exp)
            {
                IronException.Report("UI Designer Error", Exp);
            }
        }
Example #4
0
        public MainForm()
        {
            InitializeComponent();

            EditingProject = new Project();
            SetUpProject();

            ProjectEditWidget.GuidanceBehaviors += (obj, args) =>
            {
                MainTabs.SelectTab(BehaviorsTab);
                System.Diagnostics.Process.Start("https://github.com/apoch/curvature/wiki");
            };

            ProjectEditWidget.GuidanceInputs += (obj, args) =>
            {
                MainTabs.SelectTab(InputsTab);
                System.Diagnostics.Process.Start("https://github.com/apoch/curvature/wiki");
            };

            ProjectEditWidget.GuidanceKnowledgeBase += (obj, args) =>
            {
                MainTabs.SelectTab(KnowledgeTab);
                System.Diagnostics.Process.Start("https://github.com/apoch/curvature/wiki/Knowledge-Base");
            };

            ProjectEditWidget.GuidanceScenarios += (obj, args) =>
            {
                MainTabs.SelectTab(ScenariosTab);
                System.Diagnostics.Process.Start("https://github.com/apoch/curvature/wiki");
            };

            ProjectEditWidget.DialogRebuildNeeded       += () => { SetUpProject(); };
            ArchetypeEditWidget.DialogRebuildNeeded     += () => { SetUpProject(); };
            BehaviorEditWidget.DialogRebuildNeeded      += () => { SetUpProject(); };
            BehaviorSetEditWidget.DialogRebuildNeeded   += () => { SetUpProject(); };
            ConsiderationEditWidget.DialogRebuildNeeded += () => { SetUpProject(); };
        }
Example #5
0
 public void SetBytes(byte[] Bytes, string EncodingType)
 {
     if (MainHex.InvokeRequired)
     {
         SetBytes_d UiDelegate = new SetBytes_d(SetBytes);
         MainHex.Invoke(UiDelegate, new object[] { Bytes, EncodingType });
     }
     else
     {
         SetHexValue(Bytes);
         Encoding EncToUse = Encoding.GetEncoding(EncodingType);
         this.EncodingType = EncodingType;
         SetTextValue(EncToUse.GetString(Bytes), Tools.IsBinary(Bytes));
         this.ResetChangedStatus();
         if (IsInBinaryMode)
         {
             if (!MainTabs.SelectedTab.Name.Equals("HexTab"))
             {
                 MainTabs.SelectTab("HexTab");
             }
         }
         Find();
     }
 }
Example #6
0
        public MainForm()
        {
            InitializeComponent();

            FormClosing += (e, args) =>
            {
                if (EditingProject == null)
                {
                    return;
                }

                if (!EditingProject.IsDirty)
                {
                    return;
                }

                var response = MessageBox.Show("The current project has unsaved changes.\r\nWould you like to save first?", "Curvature Studio", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
                if (response == DialogResult.Cancel)
                {
                    args.Cancel = true;
                    return;
                }

                if (response == DialogResult.Yes)
                {
                    SaveProjectAsToolStripMenuItem_Click(null, null);
                }
            };

            EditingProject = new Project();
            SetUpProject();

            ProjectEditWidget.GuidanceBehaviors += (obj, args) =>
            {
                MainTabs.SelectTab(BehaviorsTab);
                System.Diagnostics.Process.Start("https://github.com/apoch/curvature/wiki");                        // TODO - #45 - wiki documentation
            };

            ProjectEditWidget.GuidanceInputs += (obj, args) =>
            {
                MainTabs.SelectTab(InputsTab);
                System.Diagnostics.Process.Start("https://github.com/apoch/curvature/wiki");                        // TODO - #45 - wiki documentation
            };

            ProjectEditWidget.GuidanceKnowledgeBase += (obj, args) =>
            {
                MainTabs.SelectTab(KnowledgeTab);
                System.Diagnostics.Process.Start("https://github.com/apoch/curvature/wiki/Knowledge-Base");
            };

            ProjectEditWidget.GuidanceScenarios += (obj, args) =>
            {
                MainTabs.SelectTab(ScenariosTab);
                System.Diagnostics.Process.Start("https://github.com/apoch/curvature/wiki");                        // TODO - #45 - wiki documentation
            };

            ProjectEditWidget.GuidanceTour += (obj, args) =>
            {
                System.Diagnostics.Process.Start("https://github.com/apoch/curvature/wiki");                        // TODO - #45 - wiki documentation
            };

            ProjectEditWidget.DialogRebuildNeeded += RefreshControls;


            BehaviorSetsEditWidget.AutoNavigationRequested += AutoNavigationRequestedFromChild;
        }
Example #7
0
 internal void AutoNavigationRequestedFromChild(Behavior behavior)
 {
     MainTabs.SelectTab(BehaviorsTab);
     BehaviorsEditWidget.NavigateTo(behavior);
 }