Beispiel #1
0
        public frmMain()
        {
            InitializeComponent();
            Text = Util.VersionInfo();
            VS2012LightTheme theme = new VS2012LightTheme();
            dockPanel1.Theme = theme;            

            Util.Init();
            tsWriteMySQL.Checked = bool.Parse(Util.INI["DEALTOEXCELDB"]["WRITE"]);
            tsPin.Checked = bool.Parse(Util.INI["SYS"]["PIN"]);
            tsBring.Checked = bool.Parse(Util.INI["SYS"]["BRINGFORWARD"]);
            LoadLayout();

            Center.Instance.AddObserver(OnPATS_BeforeReset, Observer.PATS_BeforeReset);
            Center.Instance.AddObserver(OnPATS_AfterReset, Observer.PATS_AfterReset);
            OnPATS_AfterReset(Observer.None, null);
            Util.PATS.OnFillReply += PATS_OnFillUpdate;
        }
Beispiel #2
0
        public FormMain()
        {
            CultureInfo c  = CultureInfo.CurrentCulture;
            CultureInfo ui = CultureInfo.CurrentUICulture;

            if (c.Name != "en-US" && c.Name != "ja-JP")
            {
                c = new CultureInfo("en-US");
            }
            if (ui.Name != "en-US" && ui.Name != "ja-JP")
            {
                ui = new CultureInfo("en-US");
            }
            Thread.CurrentThread.CurrentCulture   = c;
            Thread.CurrentThread.CurrentUICulture = ui;
            Translator = new DynamicTranslator();
            Instance   = this;
            this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            Utility.Configuration.Instance.Load();
            InitializeComponent();
            ThemeBase thm;

            switch (Configuration.Config.UI.Theme)
            {
            case Theme.Light:
                thm = new VS2012LightTheme();
                break;

            case Theme.Dark:
                thm = new VS2012DarkTheme();
                break;

            default:
                thm = new VS2012LightTheme();
                break;
            }
            thm.Apply(MainDockPanel);
        }
Beispiel #3
0
        private void AddDocContents()
        {
            _tasksQueueManager = new TasksQueueManager();

            var theme = new VS2012LightTheme();

            this.dockPanel.Theme         = theme;
            this.dockPanel.DocumentStyle = DocumentStyle.DockingSdi;

            _queueUserControl = new QueueUserControl(_tasksQueueManager.TasksQueue);
            _queueUserControl.Show(this.dockPanel, DockState.DockRight);

            _logUserControl = new LogUserControl();
            _logUserControl.Show(this.dockPanel, DockState.DockBottom);

            _filtersUserControl = new FiltersUserControl();
            _filtersUserControl.Show(this.dockPanel, DockState.DockLeft);
            _filtersUserControl.OnFilterChanged += FiltersUserControlOnOnFilterChanged;

            _mainUserControl       = new MainUserControl();
            _mainUserControl.Tasks = _tasksQueueManager.TasksQueue;
            _mainUserControl.Show(this.dockPanel, DockState.Document);
            _mainUserControl.OnSynchRebinded += _mainUserControl_OnSynchRebinded;
        }
 private void InitializeComponent()
 {
     pnlMainButtons    = new Panel();
     mainButton1       = new MainButton();
     pnlFooter         = new Panel();
     MyMnSt            = new MenuStrip();
     MainTab           = new DockPanel();
     vS2017LightTheme1 = new VS2017LightTheme();
     vS2012LightTheme1 = new VS2012LightTheme();
     pnlMainButtons.SuspendLayout();
     ((ISupportInitialize)MainTab).BeginInit();
     SuspendLayout();
     //
     // pnlMainButtons
     //
     pnlMainButtons.BackColor = Color.FromArgb(21, 100, 123);
     pnlMainButtons.Controls.Add(mainButton1);
     pnlMainButtons.Dock              = DockStyle.Top;
     pnlMainButtons.Font              = new Font("IRANSans(FaNum)", 8.249999F, FontStyle.Regular, GraphicsUnit.Point, 178);
     pnlMainButtons.Location          = new Point(0, 0);
     pnlMainButtons.Name              = "pnlMainButtons";
     pnlMainButtons.Size              = new Size(1200, 38);
     pnlMainButtons.TabIndex          = 0;
     pnlMainButtons.MouseDoubleClick += pnlMainButtons_MouseDoubleClick;
     //
     // mainButton1
     //
     mainButton1.BackColor   = Color.Transparent;
     mainButton1.Cursor      = Cursors.Default;
     mainButton1.Dock        = DockStyle.Fill;
     mainButton1.Font        = new Font("IRANSans(FaNum)", 8.249999F, FontStyle.Regular, GraphicsUnit.Point, 178);
     mainButton1.ForeColor   = Color.White;
     mainButton1.Location    = new Point(0, 0);
     mainButton1.Name        = "mainButton1";
     mainButton1.RightToLeft = RightToLeft.Yes;
     mainButton1.Size        = new Size(1200, 38);
     mainButton1.TabIndex    = 0;
     //
     // pnlFooter
     //
     pnlFooter.Dock     = DockStyle.Bottom;
     pnlFooter.Font     = new Font("IRANSans(FaNum)", 8.249999F, FontStyle.Regular, GraphicsUnit.Point, 178);
     pnlFooter.Location = new Point(0, 515);
     pnlFooter.Name     = "pnlFooter";
     pnlFooter.Size     = new Size(1200, 56);
     pnlFooter.TabIndex = 2;
     //
     // MyMnSt
     //
     MyMnSt.AutoSize    = false;
     MyMnSt.BackColor   = Color.FromArgb(20, 130, 150);
     MyMnSt.Font        = new Font("IRANSans(FaNum)", 8.249999F, FontStyle.Regular, GraphicsUnit.Point, 178);
     MyMnSt.LayoutStyle = ToolStripLayoutStyle.Flow;
     MyMnSt.Location    = new Point(0, 38);
     MyMnSt.Name        = "MyMnSt";
     MyMnSt.RightToLeft = RightToLeft.Yes;
     MyMnSt.Size        = new Size(1200, 36);
     MyMnSt.TabIndex    = 8;
     //
     // MainTab
     //
     MainTab.AllowDrop                  = true;
     MainTab.Dock                       = DockStyle.Fill;
     MainTab.DockBackColor              = Color.FromArgb(238, 238, 242);
     MainTab.DockLeftPortion            = 0.15D;
     MainTab.DockRightPortion           = 0.15D;
     MainTab.Font                       = new Font("IRANSans", 11F, FontStyle.Bold, GraphicsUnit.Point, 178);
     MainTab.Location                   = new Point(0, 74);
     MainTab.Name                       = "MainTab";
     MainTab.Padding                    = new Padding(6);
     MainTab.RightToLeftLayout          = true;
     MainTab.ShowAutoHideContentOnHover = false;
     MainTab.ShowDocumentIcon           = true;
     MainTab.Size                       = new Size(1200, 441);
     MainTab.TabIndex                   = 7;
     MainTab.TabStop                    = true;
     MainTab.Theme                      = vS2017LightTheme1;
     //
     // TabBarMenu
     //
     ClientSize = new Size(1200, 571);
     Controls.Add(MainTab);
     Controls.Add(MyMnSt);
     Controls.Add(pnlFooter);
     Controls.Add(pnlMainButtons);
     Font            = new Font("IRANSans", 9F, FontStyle.Regular, GraphicsUnit.Point, 178);
     FormBorderStyle = FormBorderStyle.None;
     IsMdiContainer  = true;
     Name            = "TabBarMenu";
     RightToLeft     = RightToLeft.Yes;
     StartPosition   = FormStartPosition.CenterScreen;
     WindowState     = FormWindowState.Maximized;
     FormClosing    += TabBarMenu_FormClosing;
     FormClosed     += TabBarMenu_FormClosed;
     Load           += MyMenuItem_Load;
     pnlMainButtons.ResumeLayout(false);
     ((ISupportInitialize)MainTab).EndInit();
     ResumeLayout(false);
 }
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     this.button1    = new System.Windows.Forms.Button();
     this.button2    = new System.Windows.Forms.Button();
     this.menuStrip1 = new System.Windows.Forms.MenuStrip();
     this.تمنمايشToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.menuItemSchema1          = new System.Windows.Forms.ToolStripMenuItem();
     this.menuItemSchema2          = new System.Windows.Forms.ToolStripMenuItem();
     this.dockPanel1        = new Atiran.Utility.Docking2.DockPanel();
     this.vS2012LightTheme1 = new Atiran.Utility.Docking2.Theme.ThemeVS2012.VS2012LightTheme();
     this.vS2005Theme1      = new Atiran.Utility.Docking2.Theme.ThemeVS2005.VS2005Theme();
     this.vS2017LightTheme1 = new Atiran.Utility.Docking2.Theme.ThemeVS2017.VS2017LightTheme();
     this.visualStudioToolStripExtender1 = new Atiran.Utility.Docking2.VisualStudioToolStripExtender(this.components);
     this.vS2017DarkTheme1 = new Atiran.Utility.Docking2.Theme.ThemeVS2017.VS2017DarkTheme();
     this.menuStrip1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.dockPanel1)).BeginInit();
     this.SuspendLayout();
     //
     // button1
     //
     this.button1.Dock     = System.Windows.Forms.DockStyle.Top;
     this.button1.Location = new System.Drawing.Point(0, 24);
     this.button1.Name     = "button1";
     this.button1.Size     = new System.Drawing.Size(909, 23);
     this.button1.TabIndex = 2;
     this.button1.Text     = "button1";
     this.button1.UseVisualStyleBackColor = true;
     this.button1.Click += new System.EventHandler(this.button1_Click);
     //
     // button2
     //
     this.button2.Dock     = System.Windows.Forms.DockStyle.Top;
     this.button2.Location = new System.Drawing.Point(0, 47);
     this.button2.Name     = "button2";
     this.button2.Size     = new System.Drawing.Size(909, 23);
     this.button2.TabIndex = 4;
     this.button2.Text     = "button2";
     this.button2.UseVisualStyleBackColor = true;
     this.button2.Click += new System.EventHandler(this.button2_Click);
     //
     // menuStrip1
     //
     this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.تمنمايشToolStripMenuItem
     });
     this.menuStrip1.Location = new System.Drawing.Point(0, 0);
     this.menuStrip1.Name     = "menuStrip1";
     this.menuStrip1.Size     = new System.Drawing.Size(909, 24);
     this.menuStrip1.TabIndex = 6;
     this.menuStrip1.Text     = "menuStrip1";
     //
     // تمنمايشToolStripMenuItem
     //
     this.تمنمايشToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.menuItemSchema1,
         this.menuItemSchema2
     });
     this.تمنمايشToolStripMenuItem.Name = "تمنمايشToolStripMenuItem";
     this.تمنمايشToolStripMenuItem.Size = new System.Drawing.Size(77, 20);
     this.تمنمايشToolStripMenuItem.Text = "طرح نمايش";
     //
     // menuItemSchema1
     //
     this.menuItemSchema1.Name   = "menuItemSchema1";
     this.menuItemSchema1.Size   = new System.Drawing.Size(80, 22);
     this.menuItemSchema1.Text   = "1";
     this.menuItemSchema1.Click += new System.EventHandler(this.SetSchema);
     //
     // menuItemSchema2
     //
     this.menuItemSchema2.Name   = "menuItemSchema2";
     this.menuItemSchema2.Size   = new System.Drawing.Size(80, 22);
     this.menuItemSchema2.Text   = "2";
     this.menuItemSchema2.Click += new System.EventHandler(this.SetSchema);
     //
     // dockPanel1
     //
     this.dockPanel1.BackColor                  = System.Drawing.SystemColors.Control;
     this.dockPanel1.BorderStyle                = System.Windows.Forms.BorderStyle.FixedSingle;
     this.dockPanel1.Dock                       = System.Windows.Forms.DockStyle.Fill;
     this.dockPanel1.DockBackColor              = System.Drawing.Color.FromArgb(((int)(((byte)(238)))), ((int)(((byte)(238)))), ((int)(((byte)(242)))));
     this.dockPanel1.Location                   = new System.Drawing.Point(0, 70);
     this.dockPanel1.Name                       = "dockPanel1";
     this.dockPanel1.Padding                    = new System.Windows.Forms.Padding(6);
     this.dockPanel1.RightToLeft                = System.Windows.Forms.RightToLeft.Yes;
     this.dockPanel1.RightToLeftLayout          = true;
     this.dockPanel1.ShowAutoHideContentOnHover = false;
     this.dockPanel1.Size                       = new System.Drawing.Size(909, 364);
     this.dockPanel1.TabIndex                   = 8;
     this.dockPanel1.Theme                      = this.vS2017LightTheme1;
     //
     // visualStudioToolStripExtender1
     //
     this.visualStudioToolStripExtender1.DefaultRenderer = null;
     //
     // formtest
     //
     this.ClientSize = new System.Drawing.Size(909, 434);
     this.Controls.Add(this.dockPanel1);
     this.Controls.Add(this.button2);
     this.Controls.Add(this.button1);
     this.Controls.Add(this.menuStrip1);
     this.IsMdiContainer = true;
     this.MainMenuStrip  = this.menuStrip1;
     this.Name           = "formtest";
     this.menuStrip1.ResumeLayout(false);
     this.menuStrip1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.dockPanel1)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }