상속: Form
        public static void LoadWindowPlacement( FormMain form, string path )
        {
            try {

                if ( File.Exists( path ) ) {

                    string settings;

                    using ( StreamReader sr = new StreamReader( path ) ) {
                        settings = sr.ReadToEnd();
                    }

                    WindowPlacementWrapper wp = DynamicJson.Parse( settings );

                    if ( wp.RawData.showCmd == SW.SHOWMINIMIZED )
                        wp.RawData.showCmd = SW.SHOWNORMAL;

                    SetWindowPlacement( form.Handle, ref wp.RawData );

                }

            } catch ( Exception ex ) {

                Utility.ErrorReporter.SendErrorReport( ex, LoggerRes.FailedLoadWindowPlacement );

            }
        }
예제 #2
0
        public FormFaces(FormMain main)
        {
            InitializeComponent();

            _main = main;

            IsRecording = false;
        }
예제 #3
0
 public void addSubeditorButton(FormMain formMain)
 {
     this.formMain = formMain;
     var rm = new ResourceManager("PluginChrView.Icon", this.GetType().Assembly);
     var icon = (System.Drawing.Bitmap)rm.GetObject("icon_video");
     var item = new ToolStripButton("View video", icon, btHex_Click);
     item.DisplayStyle = ToolStripItemDisplayStyle.Image;
     formMain.addSubeditorButton(item);
 }
예제 #4
0
 private static void SaveCurData(FormMain mainForm)
 {
     try
     {
         mainForm.SaveGprFile();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Ошибка при аварийном сохранении данных", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
예제 #5
0
		private MainController()
		{
			Settings = new SettingsManager();
			Lists = new ListManager();
			SoapServiceConnection = new SoapServiceConnection();
			Wallbin = new LocalWallbinManager();
			HelpManager = new HelpManager();
			WallbinViews = new ViewManager();
			MainForm = new FormMain();
			ProcessManager = new BackgroundProcessManager(MainForm, "Site Admin");
			PopupMessages = new PopupMessageHelper("Site Admin");
		}
예제 #6
0
        public FormEduYear(FormMain mainWin)
        {
            InitializeComponent();
            this.mainWin = mainWin;
            this.MdiParent = mainWin;
            this.WindowState = FormWindowState.Maximized;

            listViewEduYears.Columns.Add("№", -2, HorizontalAlignment.Left);
            listViewEduYears.Columns.Add("Поставщик", -2, HorizontalAlignment.Left);
            listViewEduYears.Columns[0].Width = 25;
            listViewEduYears.Columns[1].Width = 200;
        }
예제 #7
0
        public FormSchedulerSettings(FormMain mainForm)
        {
            InitializeComponent();

            SetIcons();
            InitDropDowns();
            Methods.SetWindowsIcon(this);

            this.Disposed += (x, y) =>
            {
                mainForm.RefreshSchedulerSettings();
            };

            _formLoaded = true;
        }
예제 #8
0
		private MainController()
		{
			Settings = new SettingsManager();
			Lists = new ListManager();

			Wallbin = new LocalWallbinManager();

			HelpManager = new HelpManager();
			EmailBin = new EmailBinManager();

			WallbinViews = new ViewManager();

			MainForm = new FormMain();
			ProcessManager = new BackgroundProcessManager(MainForm, Settings.SalesDepotName);
			PopupMessages = new PopupMessageHelper(Settings.SalesDepotName);
		}
        public static void LoadWindowPlacement( FormMain form, Stream stream )
        {
            try {
                var wp = new WindowPlacementWrapper();
                wp = (WindowPlacementWrapper)wp.Load( stream );

                if ( wp.RawData.showCmd == SW.SHOWMINIMIZED )
                    wp.RawData.showCmd = SW.SHOWNORMAL;

                SetWindowPlacement( form.Handle, ref wp.RawData );

            } catch ( Exception ex ) {

                Utility.ErrorReporter.SendErrorReport( ex, LoggerRes.FailedLoadWindowPlacement );
            }
        }
예제 #10
0
        static void internalMain(string[] args)
        {
            ISettings settings = new InMemorySettings() {
                CloseToSystemTray = true,
                HasPressureSensor = true,
                TemperatureUnitType = TemperatureUnitType.Celsius,
                RadiationUnitType = RadiationUnitType.Cpm,
                PollingType = PollingType.FixedInterval,
                LastWindowXPos = DefaultSettings.LastWindowXPos,
                LastWindowYPos = DefaultSettings.LastWindowYPos,
                PollingInterval = 1,
                DeviceIPAddress = "127.0.0.1",
                IsPollingEnabled = true,
                AreNotificationsEnabled = true,
                DetectorName = "SBM20",
                HighTemperatureNotificationValue = 25,
                TemperatureNotificationUnitType = TemperatureUnitType.Celsius,
                RadiationNotificationValue = 0,
                RadiationNotificationUnitType = RadiationUnitType.Cpm

            };

            ILogger logger = new NullLogger();

            ICollection<DeviceReadings> readings = new Collection<DeviceReadings>();
            readings.Add(new DeviceReadings() { Radiation = 19, RadiationAverage = 15, Temperature = 26, Pressure = 100040, Voltage = 375, VoltagePercent = 50 });
            readings.Add(new DeviceReadings() { Radiation = 20, RadiationAverage = 15, Temperature = 25, Pressure = 100000, Voltage = 375, VoltagePercent = 50 });
            readings.Add(new DeviceReadings() { Radiation = 25, RadiationAverage = 15, Temperature = 24, Pressure = 100020, Voltage = 375, VoltagePercent = 50 });
            readings.Add(new DeviceReadings() { Radiation = 17, RadiationAverage = 15, Temperature = 25, Pressure = 100025, Voltage = 375, VoltagePercent = 50 });
            readings.Add(new DeviceReadings() { Radiation = 18, RadiationAverage = 15, Temperature = 26, Pressure = 100030, Voltage = 375, VoltagePercent = 50 });
            readings.Add(new DeviceReadings() { Radiation = 19, RadiationAverage = 15, Temperature = 25, Pressure = 100040, Voltage = 375, VoltagePercent = 50 });

            VirtualDevice virtualDevice = new VirtualDevice("10000000", RadiationDetector.SBM20, 112, 108, DeviceModelType.A2, settings.DeviceIPAddress, "0.0.0.0", readings);
            virtualDevice.ServerResponseCode = HttpStatus.OK;
            virtualDevice.Start();

            IDeviceDataReaderFactory deviceDataReaderFactory = new DeviceDataVirtualReaderFactory(virtualDevice);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            FormMain formMain = new FormMain(deviceDataReaderFactory, settings, logger);
            formMain.SettingsChangedEventHandler += new SettingsChangedEventHandler(formMain_SettingsChangedEventHandler);

            Application.Run(formMain);
        }
예제 #11
0
        public FormIntegrate( FormMain parent )
        {
            InitializeComponent();

            this.parent = parent;

            windowCaptureButton.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormWindowCapture];

            titleComboBox.Items.AddRange( MATCH_COMBO_ITEMS );
            classNameComboBox.Items.AddRange( MATCH_COMBO_ITEMS );
            fileNameComboBox.Items.AddRange( MATCH_COMBO_ITEMS );

            TabPageContextMenuStrip = tabContextMenu;

            Utility.Configuration.Instance.ConfigurationChanged += ConfigurationChanged;
            ConfigurationChanged();

            parent.WindowCapture.AddCapturedWindow( this );
        }
예제 #12
0
파일: FormLogin.cs 프로젝트: cuongpv88/work
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtUsername.Text))
     {
         txtUsername.Properties.Appearance.BorderColor = System.Drawing.Color.Red;
         XtraMessageBox.Show("Tên đăng nhập không được để trống !", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Error);
         txtUsername.Focus();
     }
     else if (string.IsNullOrEmpty(txtPassword.Text))
     {
         txtPassword.Properties.Appearance.BorderColor = System.Drawing.Color.Red;
         XtraMessageBox.Show("Mật khẩu không được để trống !", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Error);
         txtPassword.Focus();
     }
     else
     {
         int res = CheckLogin(txtUsername.Text, txtPassword.Text);
         if (res == 0)
         {
             XtraMessageBox.Show("Tên đăng nhập hoặc mật khẩu không đúng! Vui lòng thử lại", "Lỗi!", MessageBoxButtons.OK, MessageBoxIcon.Error);
             _waitDialog.CloseWait();
             txtPassword.Properties.Appearance.BorderColor = System.Drawing.Color.Red;
             txtPassword.SelectAll();
             txtPassword.Focus();
         }
         else if (res == 1)
         {
             Hide();
             SaveRegistry();
             _waitDialog.CloseWait();
             var formMain = new FormMain();
             formMain.Show();
             //var formMain = new ShowControlsForm();
             //formMain.Show();
         }
         else
         {
             XtraMessageBox.Show(string.Format("Thông tin tài khoản: {0} không tồn tại!", txtUsername.Text), "Lỗi!", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
예제 #13
0
        private void btnIngresar_Click(object sender, EventArgs e)
        {
            string mensaje = ValidarCampos();
            if (mensaje == string.Empty)
            {
                string usuario = txtUsuario.Text.Trim(); string contrasena = txtContrasena.Text.Trim();

                try
                {
                    db_ControlEgresadosDataSet dst = new DA.db_ControlEgresadosDataSet();
                    DA.db_ControlEgresadosDataSetTableAdapters.UsuarioTableAdapter dfd = new DA.db_ControlEgresadosDataSetTableAdapters.UsuarioTableAdapter();

                    dfd.GetUsuariobyId(usuario, contrasena);
                    dfd.FillUsuariobyId(dst.Usuario, usuario, contrasena);

                    if (dst.Usuario.Rows.Count > 0)
                    {
                        CargarUsuario(dst.Usuario.FirstOrDefault());

                        //MessageBox.Show("Bienvenido Usuario " + usuario, "Bienvenido", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        FormMain nuevo = new FormMain();

                        nuevo.Show();
                        this.Hide();
                    }
                    else
                    {
                        MessageBox.Show("Usted no es Usuario del Sistema", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("No se pudo Ingresar al Sistema." + Environment.NewLine + ex.ToString(), "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }
            else
            {
                MessageBox.Show(mensaje, "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
예제 #14
0
        private void buttonLogin_Click(object sender, EventArgs e)
        {
            if (VerifyUserName() == false)
            {
                comboBoxUserName.Focus();
                return;
            }
            if (VerifyPassword() == false)
            {
                textBoxUserPassword.Focus();
                return;
            }

            AccessDataBase.Model.Manager modelManager = new AccessDataBase.Model.Manager();
            modelManager.ManagerName = comboBoxUserName.Text.Trim();

            modelManager = bllManager.GetModelList("ManagerName='"+modelManager.ManagerName+"'")[0];
            //modelManager = bllManager.GetModel(1,"Admin");
            if (modelManager == null)
            {
            }
            else if (textBoxUserPassword.Text.Trim().Equals(modelManager.ManagerPassWord))
            {
                Admin.name = modelManager.ManagerName;
                Admin.password = modelManager.ManagerPassWord;
                this.Hide();
                FormMain AccessControl = new FormMain(modelManager);
                AccessControl.ShowDialog();
            }
            else
            {
                string text = "�û��������벻��";
                labelFailInfo.Text = text;
                WidgetThread.WidgetThread.shakeLable(labelFailInfo);
            }
        }
예제 #15
0
 public OMCSForm(FormMain main)
 {
     InitializeComponent();
     m_main       = main;
     m_usersTable = main.UsersTable;
 }
예제 #16
0
 public IrcConnectionManager(FormMain form)
 {
     _form = form;
 }
예제 #17
0
        public static async Task <bool> PingServerAsync(PingConfiguration configuration, FormMain mainLink, DPSReportJSON reportJSON)
        {
            bool result = false;

            using (HttpClientController controller = new HttpClientController())
            {
                if (configuration.Method.Equals(PingMethod.Post) || configuration.Method.Equals(PingMethod.Put))
                {
                    Dictionary <string, string> fields = new Dictionary <string, string>();
                    if (reportJSON != null)
                    {
                        fields.Add("permalink", reportJSON.Permalink);
                        fields.Add("bossId", reportJSON.Encounter.BossId.ToString());
                        fields.Add("success", (reportJSON.Encounter.Success ?? false) ? "1" : "0");
                        fields.Add("arcVersion", $"{reportJSON.EVTC.Type}{reportJSON.EVTC.Version}");
                    }
                    if (configuration.Authentication.Active)
                    {
                        if (!configuration.Authentication.UseAsAuth)
                        {
                            fields.Add(configuration.Authentication.AuthName, configuration.Authentication.AuthToken);
                        }
                        else
                        {
                            controller.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue(configuration.Authentication.AuthName, configuration.Authentication.AuthToken);
                        }
                    }
                    using (FormUrlEncodedContent content = new FormUrlEncodedContent(fields))
                    {
                        HttpResponseMessage responseMessage = null;
                        try
                        {
                            if (configuration.Method.Equals(PingMethod.Put))
                            {
                                responseMessage = await controller.PutAsync(configuration.URL, content);
                            }
                            else
                            {
                                responseMessage = await controller.PostAsync(configuration.URL, content);
                            }
                            string response = await responseMessage.Content.ReadAsStringAsync();

                            PingResponse statusJSON = JsonConvert.DeserializeObject <PingResponse>(response);
                            if (responseMessage.IsSuccessStatusCode)
                            {
                                mainLink?.AddToText($">:> Log {reportJSON.UrlId} pinged. {statusJSON.Message} (code: {responseMessage.StatusCode})");
                                result = true;
                            }
                            else
                            {
                                mainLink?.AddToText($">:> Log {reportJSON.UrlId} couldn't be pinged. {statusJSON.Message} (code: {responseMessage.StatusCode})");
                            }
                        }
                        catch
                        {
                            mainLink?.AddToText($">:> Unable to ping the server \"{configuration.Name}\", check the settings or the server is not responding.");
                        }
                        finally
                        {
                            responseMessage?.Dispose();
                        }
                    }
                }
                else if (configuration.Method.Equals(PingMethod.Get) || configuration.Method.Equals(PingMethod.Delete))
                {
                    string fullLink = $"{configuration.URL}?";
                    if (reportJSON != null)
                    {
                        string success       = (reportJSON.Encounter.Success ?? false) ? "1" : "0";
                        string encounterInfo = $"bossId={reportJSON.Encounter.BossId}&success={success}&arcVersion={reportJSON.EVTC.Type}{reportJSON.EVTC.Version}&permalink={System.Web.HttpUtility.UrlEncode(reportJSON.Permalink)}";
                        fullLink = $"{fullLink}{encounterInfo}";
                        if (configuration.URL.Contains("?"))
                        {
                            fullLink = $"{configuration.URL}&{encounterInfo}";
                        }
                    }
                    if (configuration.Authentication.Active)
                    {
                        if (!configuration.Authentication.UseAsAuth)
                        {
                            fullLink = $"{fullLink}&{configuration.Authentication.AuthName.ToLower()}={configuration.Authentication.AuthToken}";
                        }
                        else
                        {
                            controller.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue(configuration.Authentication.AuthName, configuration.Authentication.AuthToken);
                        }
                    }
                    HttpResponseMessage responseMessage = null;
                    try
                    {
                        if (configuration.Method.Equals(PingMethod.Delete))
                        {
                            responseMessage = await controller.DeleteAsync(fullLink);
                        }
                        else
                        {
                            responseMessage = await controller.GetAsync(fullLink);
                        }
                        string response = await responseMessage.Content.ReadAsStringAsync();

                        PingResponse statusJSON = JsonConvert.DeserializeObject <PingResponse>(response);
                        if (responseMessage.IsSuccessStatusCode)
                        {
                            mainLink?.AddToText($">:> Log {reportJSON.UrlId} pinged. {statusJSON.Message} (code: {responseMessage.StatusCode})");
                            result = true;
                        }
                        else
                        {
                            mainLink?.AddToText($">:> Log {reportJSON.UrlId} couldn't be pinged. {statusJSON.Message} (code: {responseMessage.StatusCode})");
                        }
                    }
                    catch
                    {
                        mainLink?.AddToText($">:> Unable to ping the server \"{configuration.Name}\", check the settings or the server is not responding.");
                    }
                    finally
                    {
                        responseMessage?.Dispose();
                    }
                }
                return(result);
            }
        }
예제 #18
0
 public static void ButtonLeaveEffect(FormMain form, Button button)
 {
     button.ForeColor = form.colFormBackColor;
 }
예제 #19
0
 public FormCode(FormMain fm)
 {
     this.InitializeComponent();
     this.mainfrm = fm;
 }
 public WorldAccessible(FormMain main)
 {
     mainForm = main;
 }
예제 #21
0
 public RandoRunSpeed(FormMain formMain, RandomizerManager randomizers) : base(randomizers)
 {
     main = formMain;
 }
예제 #22
0
 /// <summary>
 /// このフォームを指定したウィンドウに対してモーダルに表示します.
 /// フォームがキャンセルされた場合true,そうでない場合はfalseを返します
 /// </summary>
 /// <param name="main_window"></param>
 /// <returns></returns>
 public bool showDialogTo( FormMain main_window )
 {
     if ( ShowDialog( main_window ) == DialogResult.Cancel ) {
         return true;
     } else {
         return false;
     }
 }
예제 #23
0
 //---------------------------------------------------------------------------
 public ExportClass(FormMain f)
 {
     f1 = f;
 }
예제 #24
0
        public static int Main(string[] arguments)
        {
            int result = 3;

            PlumbingCore plumbingCore = null;

            try
            {
                if (Properties.Settings.Default.ShowMessageOnStartup)
                {
                    MessageBox.Show("PLUMBING TOOL STARTED", "Plumbing Tool", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }

                ///////////////////////////////////////////////////////////////////////////////

                plumbingCore = new PlumbingCore(arguments);

                if (Properties.Settings.Default.ShowMainWindow)
                {
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);

                    var formMain = new FormMain(plumbingCore);
                    Application.Run(formMain);

                    result = formMain.ProcessingResult;
                }
                else
                {
                    result = plumbingCore.StartProcessing();
                }
            }
            catch (EmptyDatasetException ex)
            {
                if (plumbingCore != null && plumbingCore.Logger != null)
                {
                    plumbingCore.Logger.LogError(ex.Message);
                }

                result = 3;
            }
            catch (ArgumentException ex)
            {
                MessageBox.Show(ex.Message);

                result = 1;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);

                result = 2;
            }
            finally
            {
                if (plumbingCore != null)
                {
                    plumbingCore.Dispose();
                }
            }

            return(result);
        }
예제 #25
0
 public SyncDataField(FormMain main)
 {
     InitializeComponent();
     _formMain = main;
 }
예제 #26
0
 public async Task <bool> PingServerAsync(FormMain mainLink, DPSReportJSON reportJSON) => await PingServerAsync(this, mainLink, reportJSON);
예제 #27
0
    private void jvIa_Click(object sender, EventArgs e)
    {
        FormMain formMain = new FormMain("jvia");

        formMain.Show();
    }
예제 #28
0
		public Templates(FormMain fm, ToolStripMenuItem menuitem, EventHandler eventhandler)
		{
			this.fm = fm;
			this.menuitem = menuitem;
			this.eventhandler = eventhandler;
		}
예제 #29
0
 public MethodSelectionForm(FormMain MainF)
 {
     InitializeComponent();
     MainForm = MainF;
 }
예제 #30
0
 public UC_MonAn(FormMain fm)
 {
     InitializeComponent();
     frmMain = fm;
 }
예제 #31
0
파일: Controller.cs 프로젝트: fizikci/Cinar
        public Controller(FormMain mainForm)
        {
            this.mainForm = mainForm;

            mainForm.cmdMan.Commands.AddRange(new List<Command> {
                     new Command {
                                     Execute = cmdNewCinarSolution,
                                     Trigger = new CommandTrigger{ Control = mainForm.menuNewCinarSolution}
                                 },
                     new Command {
                                     Execute = cmdOpenCinarSolution,
                                     Trigger = new CommandTrigger{ Control = mainForm.menuOpenCinarSolution}
                                 },
                     new Command {
                                     Execute = cmdSaveCinarSolution,
                                     Trigger = new CommandTrigger{ Control = mainForm.menuSaveCinarSolution},
                                     IsEnabled = () => Solution!=null && Solution.Modified
                                 },
                     new Command {
                                     Execute = cmdAddNewItem,
                                     Trigger = new CommandTrigger{ Control = mainForm.menuAddNewItem},
                                     IsVisible = () => tree.SelectedNode != null && tree.SelectedNode.Tag is FolderItem
                                 },
                     new Command {
                                     Execute = cmdAddExistingItems,
                                     Trigger = new CommandTrigger{ Control = mainForm.menuAddExistingItems},
                                     IsVisible = () => tree.SelectedNode != null && tree.SelectedNode.Tag is FolderItem
                                 },
                     new Command {
                                     Execute = cmdAddNewFolder,
                                     Trigger = new CommandTrigger{ Control = mainForm.menuAddNewFolder},
                                     IsVisible = () => tree.SelectedNode != null && tree.SelectedNode.Tag is FolderItem
                                 },
                     new Command {
                                     Execute = cmdAddExistingFolder,
                                     Trigger = new CommandTrigger{ Control = mainForm.menuAddExistingFolder},
                                     IsVisible = () => tree.SelectedNode != null && tree.SelectedNode.Tag is FolderItem
                                 },
                     new Command {
                                     Execute = cmdDeleteItem,
                                     Trigger = new CommandTrigger{ Control = mainForm.menuDeleteItem},
                                     IsVisible = () => tree.SelectedNode != null && !(tree.SelectedNode.Tag is Solution)
                                 },
                     new Command {
                                     Execute = cmdOpenItem,
                                     Triggers = new List<CommandTrigger>{
                                         new CommandTrigger{ Control = mainForm.menuOpenItem},
                                         new CommandTrigger{ Control = mainForm.treeCodeGen, Event="DoubleClick"},
                                     },
                                     IsVisible = () => tree.SelectedNode != null && tree.SelectedNode.Tag is FileItem
                                 },
                     new Command {
                                     Execute = cmdGenerateCode,
                                     Trigger = new CommandTrigger{ Control = mainForm.menuGenerateCode}
                                 },
                     new Command {
                                     Execute = cmdShowGeneratedCode,
                                     Trigger = new CommandTrigger{ Control = mainForm.menuShowGeneratedCode}
                                 },
            });
        }
예제 #32
0
 public void addToolButton(FormMain formMain)
 {
 }
        public static void SaveWindowPlacement( FormMain form, string path )
        {
            try {

                string parent = Directory.GetParent( path ).FullName;
                if ( !Directory.Exists( parent ) ) {
                    Directory.CreateDirectory( parent );
                }

                var wp = new WindowPlacementWrapper();

                GetWindowPlacement( form.Handle, out wp.RawData );

                string settings = DynamicJson.Serialize( wp );

                using ( StreamWriter sw = new StreamWriter( path ) ) {

                    sw.Write( settings );

                }

            } catch ( Exception ex ) {

                Utility.ErrorReporter.SendErrorReport( ex, LoggerRes.FailedSaveWindowPlacement );
            }
        }
 public UITraceListener(FormMain formMain)
 {
     this.formMain = formMain;
 }
 public WorldTool(FormMain main) : base(main) { }
 public UC_ChiPhiTuyChon(FormMain fm)
 {
     InitializeComponent();
     frmMain = fm;
 }
예제 #37
0
 public static void ButtonEnterEffect(FormMain form, Button button)
 {
     button.ForeColor = form.colMedLightBlue;
 }
예제 #38
0
 public void addToolButton(FormMain formMain)
 {
 }
예제 #39
0
 public Task <bool> PingServerAsync(FormMain mainLink, DPSReportJSON reportJSON)
 {
     return(PingServerAsync(this, mainLink, reportJSON));
 }
예제 #40
0
 public TestForm(FormMain main)
 {
     _formMain = main;
     InitializeComponent();
 }
예제 #41
0
 public IrcTokenizer(FormMain form, IrcConnectionManager ircConnectionManager)
 {
     _form = form;
     _manager = ircConnectionManager;
     sv = _manager.htServer;
 }
예제 #42
0
        //private readonly FormMain _myParent;

        public FormAbout(FormMain parent)
        {
            MyParent = parent;
            InitializeComponent();
            FormBorderStyle = FormBorderStyle.FixedSingle;
        }
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (this._main != null)
         {
             this._main.Dispose();
             this._main = null;
         }
         if (this._numPadDialog != null)
         {
             this._numPadDialog.Dispose();
             this._numPadDialog = null;
         }
     }
 }
예제 #44
0
 public RandoEnemies(FormMain formMain, RandomizerManager randomizers) : base(randomizers)
 {
     main = formMain;
 }
예제 #45
0
 public UC_TheKho(FormMain fm)
 {
     InitializeComponent();
     frmMain = fm;
 }
예제 #46
0
 public UC_PhieuCho(FormMain fm)
 {
     InitializeComponent();
     frmMain = fm;
 }
예제 #47
0
        public FormJournal(FormMain mainWin)
        {
            InitializeComponent();

            this.mainWin = mainWin;
            this.MdiParent = mainWin;
            this.WindowState = FormWindowState.Maximized;

            listViewJournal.Columns.Add("№", -2, HorizontalAlignment.Left);
            listViewJournal.Columns.Add("Дата", -2, HorizontalAlignment.Left);
            listViewJournal.Columns.Add("Плательщик", -2, HorizontalAlignment.Left);
            listViewJournal.Columns.Add("Группа", -2, HorizontalAlignment.Left);
            listViewJournal.Columns.Add("Цена", -2, HorizontalAlignment.Left);
            listViewJournal.Columns.Add("Наименование платежа", -2, HorizontalAlignment.Left);

            listViewJournal.Columns[0].Width = 25;
            listViewJournal.Columns[1].Width = 100;
            listViewJournal.Columns[2].Width = 100;
            listViewJournal.Columns[3].Width = 100;
            listViewJournal.Columns[4].Width = 100;
            listViewJournal.Columns[5].Width = 200;
        }
예제 #48
0
 public BookCollector(FormMain parent)
 {
     this.Parent = parent;
 }
예제 #49
0
        public static void Ycqk(bool auto)
        {
            TaxCard card = TaxCardFactory.CreateTaxCard();

            card.get_TaxClock().ToString("yyyyMM");
            RemoteReport report = new RemoteReport();

            if (report.CheckStatus())
            {
                if (report.ISZP)
                {
                    report.ProcessMsg(FPZL.ZP, OPTYPE.ZPQK);
                    if (report.ISQKZP)
                    {
                        PropertyUtil.SetValue(AttributeName.ZPQKDateName, report.dtZPLastCSDate.ToString("yyyyMM"));
                    }
                }
                if (report.ISHY)
                {
                    report.ProcessMsg(FPZL.HY, OPTYPE.HYQK);
                    if (report.ISQKHY)
                    {
                        PropertyUtil.SetValue(AttributeName.HYQKDateName, report.dtHYLastCSDate.ToString("yyyyMM"));
                    }
                }
                if (report.ISJDC)
                {
                    report.ProcessMsg(FPZL.JDC, OPTYPE.JDCQK);
                    if (report.ISQKJDC)
                    {
                        PropertyUtil.SetValue(AttributeName.JDCQKDateName, report.dtJDCLastCSDate.ToString("yyyyMM"));
                    }
                }
                if (report.ISJSP)
                {
                    report.ProcessMsg(FPZL.JSFP, OPTYPE.JSPQK);
                    if (report.ISQKJSP)
                    {
                        PropertyUtil.SetValue(AttributeName.JSPQKDateName, report.dtJSPLastCSDate.ToString("yyyyMM"));
                    }
                }
                PropertyUtil.Save();
                if ((report.ISQKZP && report.ISQKHY) && (report.ISQKJDC && report.ISQKJSP))
                {
                    MessageManager.ShowMsgBox("YC0006");
                    FormMain.ResetForm();
                }
                else if (auto)
                {
                    string str = "本次远程清卡情况如下:\r\n";
                    if (card.get_QYLX().ISPTFP || card.get_QYLX().ISZYFP)
                    {
                        if (!report.ISQKZP)
                        {
                            if ((card.get_QYLX().ISPTFP || card.get_QYLX().ISZYFP) && (card.get_QYLX().ISPTFPDZ&& (card.get_InvEleKindCode() == 0x3d)))
                            {
                                str = str + "(" + report.dtZPLastCSDate.ToString("yyyy年MM月") + "份征期)增值税专普票及电子增值税普通发票清卡失败,原因:";
                            }
                            else if ((card.get_QYLX().ISPTFP || card.get_QYLX().ISZYFP) && (!card.get_QYLX().ISPTFPDZ || (card.get_QYLX().ISPTFPDZ&& (card.get_InvEleKindCode() == 0x33))))
                            {
                                str = str + "(" + report.dtZPLastCSDate.ToString("yyyy年MM月") + "份征期)增值税专普票清卡失败,原因:";
                            }
                            else if ((!card.get_QYLX().ISPTFP&& !card.get_QYLX().ISZYFP) && (card.get_QYLX().ISPTFPDZ&& (card.get_InvEleKindCode() == 0x3d)))
                            {
                                str = str + "(" + report.dtZPLastCSDate.ToString("yyyy年MM月") + "份征期)电子增值税普通发票清卡失败,原因:";
                            }
                            str = str + report.QKZPMESS + "\r\n";
                        }
                        else
                        {
                            if ((card.get_QYLX().ISPTFP || card.get_QYLX().ISZYFP) && (card.get_QYLX().ISPTFPDZ&& (card.get_InvEleKindCode() == 0x3d)))
                            {
                                str = str + "(" + report.dtZPLastCSDate.ToString("yyyy年MM月") + "份征期)增值税专普票及电子增值税普通发票清卡成功:";
                            }
                            else if ((card.get_QYLX().ISPTFP || card.get_QYLX().ISZYFP) && (!card.get_QYLX().ISPTFPDZ || (card.get_QYLX().ISPTFPDZ&& (card.get_InvEleKindCode() == 0x33))))
                            {
                                str = str + "(" + report.dtZPLastCSDate.ToString("yyyy年MM月") + "份征期)增值税专普票清卡成功:";
                            }
                            else if ((!card.get_QYLX().ISPTFP&& !card.get_QYLX().ISZYFP) && (card.get_QYLX().ISPTFPDZ&& (card.get_InvEleKindCode() == 0x3d)))
                            {
                                str = str + "(" + report.dtZPLastCSDate.ToString("yyyy年MM月") + "份征期)电子增值税普通发票清卡成功:";
                            }
                            str = str + report.QKZPMESS + "\r\n";
                        }
                    }
                    if (card.get_QYLX().ISHY)
                    {
                        if (!report.ISQKHY)
                        {
                            str = (str + "(" + report.dtHYLastCSDate.ToString("yyyy年MM月") + "份征期)货物运输业增值税专用发票清卡失败,原因:") + report.QKHYMESS + "\r\n";
                        }
                        else if (card.get_QYLX().ISHY)
                        {
                            str = (str + "(" + report.dtHYLastCSDate.ToString("yyyy年MM月") + "份征期)货物运输业增值税专用发票清卡成功:") + report.QKHYMESS + "\r\n";
                        }
                    }
                    if (card.get_QYLX().ISJDC || card.get_QYLX().ISPTFPDZ)
                    {
                        if (card.get_QYLX().ISJDC)
                        {
                            if (!str.Contains("机动车"))
                            {
                                str = str + "(" + report.dtJDCLastCSDate.ToString("yyyy年MM月") + "份征期)机动车销售统一发票";
                            }
                            else
                            {
                                str = str + "及机动车销售统一发票";
                            }
                        }
                        if (card.get_QYLX().ISPTFPDZ&& (card.get_InvEleKindCode() == 0x33))
                        {
                            if (!str.Contains("机动车"))
                            {
                                str = str + "(" + report.dtJDCLastCSDate.ToString("yyyy年MM月") + "份征期)电子增值税普通发票";
                            }
                            else
                            {
                                str = str + "及电子增值税普通发票";
                            }
                        }
                        if (!report.ISQKJDC)
                        {
                            str = (str + "清卡失败,原因:") + report.QKJDCMESS + "\r\n";
                        }
                        else if (card.get_QYLX().ISJDC || card.get_QYLX().ISPTFPDZ)
                        {
                            str = (str + "清卡成功:") + report.QKJDCMESS + "\r\n";
                        }
                    }
                    if (card.get_QYLX().ISPTFPJSP)
                    {
                        if (!report.ISQKJSP)
                        {
                            str = (str + "(" + report.dtJSPLastCSDate.ToString("yyyy年MM月") + "份征期)增值税普通发票(卷票)清卡失败,原因:") + report.QKJSFPMESS + "\r\n";
                        }
                        else if (card.get_QYLX().ISPTFPJSP)
                        {
                            str = (str + "(" + report.dtJSPLastCSDate.ToString("yyyy年MM月") + "份征期)增值税普通发票(卷票)清卡成功:") + report.QKJSFPMESS + "\r\n";
                        }
                    }
                    MessageManager.ShowMsgBox("YC0009", new string[] { str });
                }
            }
            FormMain.RefreashStatus();
        }
예제 #50
0
        public IModel1 Init()
        {
            logger = LogManager.GetCurrentClassLogger();
            MainForm = IoC.Instance.Get<IFormMain>() as FormMain;

            GprFileTools = IoC.Instance.Get<IGprFileTools>().Init();

            UserInterface = new UserInterfaceUpdater(this, MainForm.panelToolStripBigButtons.Controls,
                MainForm.panelTop.Controls, MainForm.panelStatusStrip.Controls);

            PicCtrl = new PictureCtrl(
                MainForm.panelPic.Size,
                GprFileTools.ReadTempFilePart,
                UserInterface.StatusStrip.Strip,
                GprFileTools.Info.MarksMgr,
                UserInterface.ZoomRefresh,
                GprFileTools.Info.AscansGPS);
            PicCtrl.Dock = DockStyle.Fill;

            MainForm.panelPic.Controls.Add(PicCtrl);

            RefreshTxt();

            UserInterface.SetStatusVelocity();
            UserInterface.SetAscanLength(GprFileTools.Info.pythonSettings.GetAscanLength());
            UserInterface.SetMainMode(UserInterfaceUpdater.ModeType.Empty);

            return this;
        }
예제 #51
0
 public TileFill(FormMain main) : base(main) 
 {
     CanvasCursor = FormMain.CursorPaint;
 }
예제 #52
0
 public SynthesizeWorker(FormMain main_window)
 {
     mMainWindow = main_window;
 }
예제 #53
0
 /// <summary>
 /// PersistStringから復元
 /// </summary>
 public static FormIntegrate FromPersistString( FormMain parent, String str )
 {
     WindowInfo info = new WindowInfo();
     info = (WindowInfo)info.Load( new StringReader( str.Substring( PREFIX.Length ) ) );
     FormIntegrate form = new FormIntegrate( parent );
     form.WindowData = info;
     return form;
 }
예제 #54
0
파일: LogManager.cs 프로젝트: lscyane/KCBr
 public LogManager(FormMain mainFrm)
 {
     _mainFrm = mainFrm;
 }
예제 #55
0
 public StringConvert(FormMain main)
 {
     InitializeComponent();
     _formMain = main;
 }
예제 #56
0
 public void Initialize(FormMain formMain)
 {
     _formMain        = formMain ?? throw new ArgumentException("Form main can not be null");
     _formMain.Shown += _formMain_Shown;
 }
        public static void SaveWindowPlacement( FormMain form, Stream stream )
        {
            try {
                var wp = new WindowPlacementWrapper();

                GetWindowPlacement( form.Handle, out wp.RawData );

                wp.Save( stream );

            } catch ( Exception ex ) {

                Utility.ErrorReporter.SendErrorReport( ex, LoggerRes.FailedSaveWindowPlacement );
            }
        }
예제 #58
0
        // =================================================================================

        public PanelizeForm(FormMain MainF)
        {
            MainForm = MainF;
            InitializeComponent();
        }
예제 #59
0
 /// <summary>
 /// 用户单击“取消”按钮时的事件处理方法。
 /// </summary>
 private void BtnCancel_Click(object sender, EventArgs e)
 {
     FormMain.LoadNewControl(ScheduleJobList.Instance); // 载入该模块的信息列表界面至主窗体显示。
 }
예제 #60
0
 public FormThanks(FormMain formMain)
 {
     InitializeComponent();
     _formMain = formMain;
     _formMain.DisenableAll(true);
 }