Example #1
0
        public void Execute( )
        {
            OnExecuting( );

            ConfigControl.Visible = true;

            ConfigControl.BringToFront( );

            OnExecuted( );
        }
Example #2
0
        public static void Initialize()
        {
            List <string> errMsgs = new List <string>();

            TheText.Init(errMsgs);
            foreach (string errMsg in errMsgs)
            {
                MessageBox.Show(errMsg, ConfigBase.ColorizationName, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            ConfigControl.Init();
        }
Example #3
0
 private void BtnStart_Click(object sender, RoutedEventArgs e)
 {
     _startTime                 = DateTime.Now;
     Chat.IsEnabled             = true;
     PlayerList.IsEnabled       = true;
     ((Button)sender).IsEnabled = false;
     BtnStop.IsEnabled          = true;
     _uiUpdate.Start();
     ConfigControl.SaveConfig();
     new Thread(_server.Start).Start();
 }
Example #4
0
        private ConfigPane(Object inWin, Object inDoc, CustomTaskPaneCollection inCustomTaskPanes, string version)
        {
            const int OrigWidth = 363;

            logger.ConditionalDebug("ConfigPane");
            theWin               = inWin;
            theDoc               = inDoc;
            customTaskPanes      = inCustomTaskPanes;
            confContr            = new ConfigControl(inWin, inDoc, version);
            configTaskPane       = customTaskPanes.Add(confContr, ConfigBase.ColorizationName, theWin);
            configTaskPane.Width = ((int)(OrigWidth * confContr.ScaleFactor)) + 2;
        }
Example #5
0
        public static void Initialize()
        {
            logger.ConditionalDebug("Initialize");
            List <string> errMsgs = new List <string>();

            TheText.Init(errMsgs);
            foreach (string errMsg in errMsgs)
            {
                MessageBox.Show(errMsg, ConfigBase.ColorizationName, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            ConfigControl.Init();
            HilightForm.hiliColors = hilightColors;
        }
Example #6
0
        public void LoadConfig(TorchConfig config)
        {
            if (!Directory.Exists(config.InstancePath))
            {
                return;
            }

            _config = config;
            Dispatcher.Invoke(() =>
            {
                ConfigControl.LoadDedicatedConfig(config);
                InstancePathBox.Text = config.InstancePath;
            });
        }
Example #7
0
        private void ClearMiddlePannel()
        {
            songlist.Enabled = false;
            songlist.Visible = false;

            artistGrid.Enabled = false;
            artistGrid.Visible = false;

            albumGrid.Enabled  = false;
            artistGrid.Visible = false;

            albumPresentation?.Dispose();
            albumPresentation = null;

            configControl?.Dispose();
            configControl = null;
        }
Example #8
0
        protected void InitConfigControl()
        {
            ClearMiddlePannel();
            search.Visible = false;

            configControl = new ConfigControl()
            {
                Size     = songlist.Size,
                Location = songlist.Location,
                Anchor   = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right
            };


            Controls.Add(configControl);

            Invalidate();
        }
Example #9
0
        public DuoConfForm(Config inConf)
        {
            UndoFactory.DisableUndoRegistration();
            InitializeComponent();
            theConf = inConf;

            // Faisons une copie de duoConf qui sera éditée. Si l'utilisateur clique "Valider" on
            // pourra l'utiliser sinon on pourra la jeter.

            theConfCopy = theConf.DeepCopy();
            duoConfCopy = theConfCopy.duoConf;
            this.SuspendLayout();

            confContr1 = new ConfigControl(duoConfCopy.subConfig1);
            panelConfig1.Controls.Add(confContr1);
            confContr2 = new ConfigControl(duoConfCopy.subConfig2);
            panelConfig2.Controls.Add(confContr2);
            rTBText   = new RTBText(rtbUlysse);
            resetting = false;

            duoConfCopy.AlternanceModifiedEvent      += UpdateAlternance;
            duoConfCopy.AlternanceModifiedEvent      += UpdateRichTextBox;
            duoConfCopy.ColorisFunctionModifiedEvent += UpdateColorisFunction;
            duoConfCopy.ColorisFunctionModifiedEvent += UpdateRichTextBox;
            duoConfCopy.NbreAltModifiedEvent         += UpdateNbreAlt;
            duoConfCopy.NbreAltModifiedEvent         += UpdateRichTextBox;

            RegisterConfigEvents(duoConfCopy.subConfig1);
            RegisterConfigEvents(duoConfCopy.subConfig2);

            UpdateAlternance(this, EventArgs.Empty);
            UpdateColorisFunction(this, EventArgs.Empty);
            UpdateNbreAlt(this, EventArgs.Empty);
            UpdateRichTextBox(this, EventArgs.Empty);

            this.ResumeLayout();
            UndoFactory.EnableUndoRegistration();
        }
Example #10
0
            public override void Initialize()
            {
                Connection = new ConfigConnection();
                UI         = new ConfigUI();
                Log        = new ConfigLog();
                Control    = new ConfigControl();
                Debug      = new ConfigDebug();
                Life       = new ConfigLife();

                FormArsenal      = new ConfigFormArsenal();
                FormFleet        = new ConfigFormFleet();
                FormHeadquarters = new ConfigFormHeadquarters();
                FormQuest        = new ConfigFormQuest();
                FormShipGroup    = new ConfigFormShipGroup();
                FormBrowser      = new ConfigFormBrowser();

                NotifierExpedition   = new ConfigNotifierBase();
                NotifierConstruction = new ConfigNotifierBase();
                NotifierRepair       = new ConfigNotifierBase();
                NotifierCondition    = new ConfigNotifierBase();
                NotifierDamage       = new ConfigNotifierDamage();

                Whitecap = new ConfigWhitecap();
            }
Example #11
0
        private void b_Final_Next_Click(object sender, EventArgs e)
        {
            try {
                bool notCompleted = false;
                var  textboxList  = Tools.GetAllType(this, typeof(TextBox));

                foreach (TextBox tb in textboxList)
                {
                    if (tb.Text.Length < 1)
                    {
                        notCompleted = true;
                    }
                }
                if (notCompleted)
                {
                    MessageBox.Show("Some fields are empty!");
                    return;
                }

                string customer = tB_SO.Text + "_" + tB_Customer.Text;

                if (Directory.Exists(tB_Destination.Text + @"\" + customer + @"\"))
                {
                    MessageBox.Show("Folder already exists!");
                    return;
                }

                string ip = HasIP(tB_Source.Text);
                if (ip != "")
                {
                    if (!OtherCamCom.PingAdr(ip).Result)
                    {
                        Tools.ShowPopup("Couldn't ping address given within Source Folder input!\nShow more?",
                                        "Final Mode Failed!", "Tried to ping: " + ip);
                        return;
                    }
                }

                if (!Directory.Exists(tB_Source.Text))
                {
                    MessageBox.Show("Source folder doesn't exist!");
                    return;
                }

                string dest      = Directory.CreateDirectory(tB_Destination.Text + @"\" + customer + @"\").FullName;
                string appFolder = Directory.CreateDirectory(dest + @"SSUtility2\").FullName;
                string manuals   = Directory.CreateDirectory(dest + @"Manuals\").FullName;
                string evidence  = Directory.CreateDirectory(dest + @"Test Evidence\").FullName;
                string useful    = Directory.CreateDirectory(dest + @"Useful Applications\").FullName;

                this.Hide();

                string self = Process.GetCurrentProcess().MainModule.FileName;
                File.Copy(self, appFolder + System.Diagnostics.Process.GetCurrentProcess().MainModule.ModuleName);

                if (Tools.CheckIfNameValid(dest, false) &&
                    Tools.CheckIfNameValid(tB_Source.Text, false))
                {
                    if (check_Default.Checked)
                    {
                        ConfigControl.finalSource.UpdateValue(tB_Source.Text);
                        ConfigControl.finalDestination.UpdateValue(tB_Destination.Text);
                        ConfigControl.CreateConfig(ConfigControl.appFolder + ConfigControl.config);
                    }

                    if (check_Old.Checked)
                    {
                        Tools.CopyFiles(appFolder, Directory.GetFiles(tB_Source.Text));
                        Tools.CopyDirs(appFolder, Directory.GetDirectories(tB_Source.Text));
                    }
                }

                MainForm.m.Text = "FINAL TEST MODE - " + customer.Replace("_", " ");
                MainForm.m.ToggleFinalMode(dest);
            } catch (Exception error) {
                Tools.ShowPopup("Failed to start Final Test Mode!\nShow more?", "Final Test Mode Failed!", error.ToString());
            }
        }
			public override void Initialize() {

				Connection = new ConfigConnection();
				UI = new ConfigUI();
				Log = new ConfigLog();
				Control = new ConfigControl();
				Debug = new ConfigDebug();
				Life = new ConfigLife();

				FormArsenal = new ConfigFormArsenal();
				FormDock = new ConfigFormDock();
				FormFleet = new ConfigFormFleet();
				FormFleetPlus = new ConfigFormFleetPlus();
				FormHeadquarters = new ConfigFormHeadquarters();
				FormQuest = new ConfigFormQuest();
				FormShipGroup = new ConfigFormShipGroup();
				FormBrowser = new ConfigFormBrowser();
				FormCompass = new ConfigFormCompass();

				NotifierExpedition = new ConfigNotifierBase();
				NotifierConstruction = new ConfigNotifierBase();
				NotifierRepair = new ConfigNotifierBase();
				NotifierCondition = new ConfigNotifierBase();
				NotifierDamage = new ConfigNotifierDamage();
				NotifierAnchorageRepair = new ConfigNotifierAnchorageRepair();

				BGMPlayer = new ConfigBGMPlayer();
				Whitecap = new ConfigWhitecap();

				VersionUpdateTime = DateTimeHelper.TimeToCSVString( SoftwareInformation.UpdateTime );

			}
			public override void Initialize() {

				Connection = new ConfigConnection();
				UI = new ConfigUI();
				Log = new ConfigLog();
				Control = new ConfigControl();
				Debug = new ConfigDebug();
				Life = new ConfigLife();

				FormArsenal = new ConfigFormArsenal();
				FormFleet = new ConfigFormFleet();
				FormHeadquarters = new ConfigFormHeadquarters();
				FormQuest = new ConfigFormQuest();
				FormShipGroup = new ConfigFormShipGroup();
				FormBrowser = new ConfigFormBrowser();

				NotifierExpedition = new ConfigNotifierBase();
				NotifierConstruction = new ConfigNotifierBase();
				NotifierRepair = new ConfigNotifierBase();
				NotifierCondition = new ConfigNotifierBase();
				NotifierDamage = new ConfigNotifierDamage();

				Whitecap = new ConfigWhitecap();

			}
Example #14
0
 private void BtnStart_Click(object sender, RoutedEventArgs e)
 {
     _config.Save();
     ConfigControl.SaveConfig();
     new Thread(_server.Start).Start();
 }