예제 #1
0
        public ConfigFishingForm(SaveConfigHolder configHolder)
        {
            this.TopMost = true;
            InitializeComponent();
            this.closeButton                       = new Controls.ImageButton();
            this.closeButton.Parent                = this;
            this.closeButton.ForeColor             = Color.Transparent;
            this.closeButton.BackgroundImage       = global::FFXIV_netBot.Properties.Resources.closeBtn;
            this.closeButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.closeButton.Location              = new System.Drawing.Point(340, 11);
            this.closeButton.Name                  = "buttonClose";
            this.closeButton.Size                  = new System.Drawing.Size(19, 18);
            this.closeButton.TabStop               = false;
            this.closeButton.Click                += new System.EventHandler(this.CancelButton_Click);
            this.Controls.Add(this.closeButton);

            /*
             *
             */

            if (configHolder == null)
            {
                configHolder = new SaveConfigHolder();
            }

            if (configHolder.fileName.Length == 0)
            {
                configHolder.fishingConfig = RestoreConfigDefault.defaultFishingConfig();
            }

            configHolder.type       = ConfigType.Fishing;
            this.fileNameLabel.Text = configHolder.fileName;
            this.renderFishingConfig(configHolder.fishingConfig);
            this.configHolder = configHolder;
        }
예제 #2
0
        public SaveWaypointForm(List <Waypoint> waypointList, SaveWaypointDelegate saveFinishDelegate, string fileName)
        {
            this.defFileName        = fileName;
            this.saveFinishDelegate = saveFinishDelegate;
            this.currentDirectory   = Path.GetDirectoryName(Application.ExecutablePath);

            this.TopMost      = true;
            this.waypointList = new List <Waypoint>(waypointList);
            InitializeComponent();

            this.closeButton                       = new Controls.ImageButton();
            this.closeButton.Parent                = this;
            this.closeButton.ForeColor             = Color.Transparent;
            this.closeButton.BackgroundImage       = global::FFXIV_netBot.Properties.Resources.closeBtn;
            this.closeButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.closeButton.Location              = new System.Drawing.Point(220, 11);
            this.closeButton.Name                  = "buttonClose";
            this.closeButton.Size                  = new System.Drawing.Size(19, 18);
            this.closeButton.TabStop               = false;
            this.closeButton.Click                += new System.EventHandler(this.CancelButton_Click);
            this.Controls.Add(this.closeButton);

            this.scanDirectoryForWaypointRoute();

            String item = (string)this.existFileSelector.SelectedItem;

            this.saveButton.Enabled = (waypointList.Count > 0);
        }
예제 #3
0
 public EntityForm(FinalFantasyXIVMemory memory)
 {
     this.memory  = memory;
     this.TopMost = true;
     InitializeComponent();
     this.closeButton                       = new Controls.ImageButton();
     this.closeButton.Parent                = this;
     this.closeButton.ForeColor             = Color.Transparent;
     this.closeButton.BackgroundImage       = global::FFXIV_netBot.Properties.Resources.closeBtn;
     this.closeButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
     this.closeButton.Location              = new System.Drawing.Point(740, 11);
     this.closeButton.Name                  = "button1";
     this.closeButton.Size                  = new System.Drawing.Size(19, 18);
     this.closeButton.TabStop               = false;
     this.closeButton.Click                += new System.EventHandler(this.exitPressed);
     this.Controls.Add(this.closeButton);
 }
예제 #4
0
 public SettingForm(ChangeSettingsFinished saveDelegate)
 {
     this.saveDelegate = saveDelegate;
     this.TopMost      = true;
     InitializeComponent();
     this.closeButton                       = new Controls.ImageButton();
     this.closeButton.Parent                = this;
     this.closeButton.ForeColor             = Color.Transparent;
     this.closeButton.BackgroundImage       = global::FFXIV_netBot.Properties.Resources.closeBtn;
     this.closeButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
     this.closeButton.Location              = new System.Drawing.Point(420, 11);
     this.closeButton.Name                  = "buttonClose";
     this.closeButton.Size                  = new System.Drawing.Size(19, 18);
     this.closeButton.TabStop               = false;
     this.closeButton.Click                += new System.EventHandler(this.CancelButton_Click);
     this.Controls.Add(this.closeButton);
 }
예제 #5
0
 public WaypointEditForm(Waypoint wp, EditWaypointDelegate changeCallback)
 {
     this.callback = changeCallback;
     this.TopMost  = true;
     InitializeComponent();
     this.typeComboBox.DataSource           = Enum.GetValues(typeof(WaypointType));
     this.closeButton                       = new Controls.ImageButton();
     this.closeButton.Parent                = this;
     this.closeButton.ForeColor             = Color.Transparent;
     this.closeButton.BackgroundImage       = global::FFXIV_netBot.Properties.Resources.closeBtn;
     this.closeButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
     this.closeButton.Location              = new System.Drawing.Point(220, 11);
     this.closeButton.Name                  = "buttonClose";
     this.closeButton.Size                  = new System.Drawing.Size(19, 18);
     this.closeButton.TabStop               = false;
     this.closeButton.Click                += new System.EventHandler(this.CancelButton_Click);
     this.Controls.Add(this.closeButton);
     this.initWithWaypoint(wp);
 }
예제 #6
0
        public ConfigSelectFrom(LoadConfigForm loadFormDelegate)
        {
            this.currentDirectory = Path.GetDirectoryName(Application.ExecutablePath);
            this.loadFormDelegate = loadFormDelegate;
            this.TopMost          = true;
            InitializeComponent();
            this.closeButton                       = new Controls.ImageButton();
            this.closeButton.Parent                = this;
            this.closeButton.ForeColor             = Color.Transparent;
            this.closeButton.BackgroundImage       = global::FFXIV_netBot.Properties.Resources.closeBtn;
            this.closeButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.closeButton.Location              = new System.Drawing.Point(220, 11);
            this.closeButton.Name                  = "buttonClose";
            this.closeButton.Size                  = new System.Drawing.Size(19, 18);
            this.closeButton.TabStop               = false;
            this.closeButton.Click                += new System.EventHandler(this.CancelButton_Click);
            this.Controls.Add(this.closeButton);

            this.scanDirectoryForConfig();
        }
예제 #7
0
        private void LinkControls(ControlCollection ctrls)
        {
            foreach (Control ctrl in ctrls)
            {
                switch (ctrl.ID)
                {
                case "tgQR":
                    tgQR           = (Toggle)ctrl;
                    tgQR.ImagePath = ThemePath;
                    break;

                case "tgdQR":
                    tgdQR = (ToggleDisplay)ctrl;
                    break;

                case "plhMessage":
                    plhMessage = (PlaceHolder)ctrl;
                    break;

                case "reqUserName":
                    reqUserName = (System.Web.UI.WebControls.RequiredFieldValidator)ctrl;
                    break;

                case "txtUserName":
                    txtUserName = (System.Web.UI.HtmlControls.HtmlInputText)ctrl;
                    break;

                case "reqBody":
                    reqBody = (Label)ctrl;
                    break;

                case "reqSecurityCode":
                    reqSecurityCode = (Label)ctrl;
                    break;

                case "chkSubscribe":
                    chkSubscribe = (CheckBox)ctrl;
                    break;

                case "ambtnSubmit":
                    ambtnSubmit = (ImageButton)ctrl;
                    break;

                case "btnSubmit":
                    btnSubmit = (System.Web.UI.HtmlControls.HtmlInputButton)ctrl;
                    break;

                case "trUsername":
                    trUsername = (System.Web.UI.HtmlControls.HtmlTableRow)ctrl;
                    break;

                case "trCaptcha":
                    trCaptcha = (System.Web.UI.HtmlControls.HtmlTableRow)ctrl;
                    break;

                case "trSubscribe":
                    trSubscribe = (System.Web.UI.HtmlControls.HtmlTableRow)ctrl;
                    break;
                }
                if (ctrl is Controls.ControlsBase)
                {
                    ((Controls.ControlsBase)ctrl).ControlConfig = this.ControlConfig;
                }
                if (ctrl.Controls.Count > 0)
                {
                    LinkControls(ctrl.Controls);
                }
            }
        }
예제 #8
0
 private void LinkControls(ControlCollection ctrls)
 {
     foreach (Control ctrl in ctrls)
     {
         switch (ctrl.ID)
         {
             case "tgQR":
                 tgQR = (Toggle)ctrl;
                 tgQR.ImagePath = ThemePath;
                 break;
             case "tgdQR":
                 tgdQR = (ToggleDisplay)ctrl;
                 break;
             case "plhMessage":
                 plhMessage = (PlaceHolder)ctrl;
                 break;
             case "reqUserName":
                 reqUserName = (System.Web.UI.WebControls.RequiredFieldValidator)ctrl;
                 break;
             case "txtUserName":
                 txtUserName = (System.Web.UI.HtmlControls.HtmlInputText)ctrl;
                 break;
             case "reqBody":
                 reqBody = (Label)ctrl;
                 break;
             case "reqSecurityCode":
                 reqSecurityCode = (Label)ctrl;
                 break;
             case "chkSubscribe":
                 chkSubscribe = (CheckBox)ctrl;
                 break;
             case "ambtnSubmit":
                 ambtnSubmit = (ImageButton)ctrl;
                 break;
             case "btnSubmit":
                 btnSubmit = (System.Web.UI.HtmlControls.HtmlInputButton)ctrl;
                 break;
             case "trUsername":
                 trUsername = (System.Web.UI.HtmlControls.HtmlTableRow)ctrl;
                 break;
             case "trCaptcha":
                 trCaptcha = (System.Web.UI.HtmlControls.HtmlTableRow)ctrl;
                 break;
             case "trSubscribe":
                 trSubscribe = (System.Web.UI.HtmlControls.HtmlTableRow)ctrl;
                 break;
         }
         if (ctrl is Controls.ControlsBase)
         {
             ((Controls.ControlsBase)ctrl).ControlConfig = this.ControlConfig;
         }
         if (ctrl.Controls.Count > 0)
         {
             LinkControls(ctrl.Controls);
         }
     }
 }