Beispiel #1
0
        private void MyForm_notifiedMe_aboutNext(eFlowformFormEvents SomeEvent_)
        {
            switch (SomeEvent_)
            {
            case eFlowformFormEvents.Next:
                // ToDos: here!



                MyProcess.Undefined_orAll = MyForm.Undefined_orAll;
                #region ((cFlowform)MyFlowforms[0]).Show();
                if (MyFlowforms[0] == null)
                {
                    MyFlowforms[0] = new cManage_Views_PK_s010(
                        Base_ref,
                        new cFlowform.dNotifyBase(MyFlowforms_notifiedMe),
                        MyProcess
                        );
                }
                MyForm.Hide();
                MyFlowforms[0].Show();
                #endregion



                break;
            }
        }
Beispiel #2
0
 internal void removeFullPanels()
 {
     foreach (Form MyForm in AllForms)
     {
         MyForm.Dispose();
     }
 }
    static void Main()
    {
        MyForm myForm = new MyForm();

        //Display the form.
        Application.Run(myForm);
    }
		public WinUsbDeviceMonitor ()
		{
			form = new MyForm();
			form.Monitor = this;
			form.Visible = true;
			form.Visible = false;
		}
        /// <summary>
        /// 获取单个画师,只能由DoGetThread执行
        /// </summary>
        /// <param name="listUrl">画师作品列表页</param>
        protected void GetSingle(object objParame)
        {
            try
            {
                if (!Mut.IsContinue)
                {
                    return;
                }

                //因为循环里没有做修改,所有可以放外面
                var parame = (RequestParameEntity)objParame;

                MyForm.BeginInvoke(new Action(() => { MyForm.RtxtSuccess.Text = ""; }));

                if (IsSingle)
                {
                    MyForm.Invoke(new Action(() => { MyForm.TxtSavePath.Text = parame.SavePath; }));
                }

                EachListPage(parame.ListUrl, DownContentType.SinglePainter, new Action <string>(itemUrl =>
                {
                    if (!Mut.IsContinue)
                    {
                        return;
                    }

                    itemUrl = HtmlHelp.NeedHost(parame.ListUrl, itemUrl);

                    var ri = new RequestItemParameEntity()
                    {
                        ItemUrl = itemUrl, SavePath = parame.SavePath
                    };

                    if (IsSingle)
                    {
                        GetWorksItem(ri);
                    }
                    else
                    {
                        while (!Mut.DoDownAction(ri, GetWorksItem) && Mut.IsContinue)
                        {
                            Thread.Sleep(1000);
                        }
                    }
                }));
            }
            catch (Exception ex)
            {
                AddErrorMsg(ex.Message + "\r\n");
                HtmlHelp.SaveStringToTxt(ex.Message + "\r\n" + ex.StackTrace + "\r\n\r\n", "Error.txt");
            }
            finally
            {
                //if (!IsSingle)
                //{
                //    Mut.RemoveGThread();
                //}
            }
        }
Beispiel #6
0
        public static void LogJobFinished(ClientCore core)
        {
            var model = core.MyJob.ModelFullPath;
            var rec   = core.MyJob.Record;
            var im    = core.MyJob.Im;

            MyForm.UpdateJobInTable(model, rec, im, "Finished", core.CoreTag.ToString(), core.MyJob.StartTime, core.MyJob.EndTime, core.MyJob.JobTime);
        }
Beispiel #7
0
        public static void LogNewJobStarted(ClientCore core)
        {
            var model = core.MyJob.ModelFullPath;
            var rec   = core.MyJob.Record;
            var im    = core.MyJob.Im;

            MyForm.UpdateJobInTable(model, rec, im, "Running", core.CoreTag.ToString(), core.MyJob.StartTime, "---", "---");
        }
        public ActionResult DeleteConfirmed(int id)
        {
            MyForm myForm = db.MyForms.Find(id);

            db.MyForms.Remove(myForm);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #9
0
 //etc...
 public void Dispose()
 {
      if(MyForm != null)
           MyForm.Dispose()
      if(MyControl != null)
           MyControl.Dispose()
      //etc..
 }
Beispiel #10
0
    /// <summary>
    /// Load the main menu
    /// </summary>
    public void LoadMainMenu()
    {
        current      = (MyForm)General.Create(Root.mainMenu, new Vector2());
        mainMenuForm = current;
        CamControl.ChangeTo("Main");

        Debug.Log("Load Main Menu");
    }
Beispiel #11
0
 static void Main(string[] args)
 {
     //Application.Run(new Program());
     MyForm form = new MyForm();
     form.Click += new EventHandler(sender,EventArgs) =>
     {
         Application.Exit();
     });
Beispiel #12
0
        public async Task <MyForm> AddForm(MyForm form)
        {
            form.Id = ObjectId.GenerateNewId().ToString();

            await _context.Forms.InsertOneAsync(form);

            return(await _context.Forms.Find(w => w.Id == form.Id).FirstOrDefaultAsync());
        }
     public MyForm()
     {
         InitializeComponent();
         if (alreadyOpened != null) {
             alreadyOpened.Close();
         alreadyOpened = this;
     }
 }
 public IActionResult Index(MyForm item)
 {
     if (!string.IsNullOrWhiteSpace(item?.Message))
     {
         cache.SetString("message", item.Message);
     }
     return(RedirectToAction("Index"));
 }
        public void Can_CreateForm() {
            using(var form = new MyForm()) {
                form.Show();
                form.Update();

                ThreadTool.Sleep(5000);
            }
        }
Beispiel #16
0
 public ActionResult Index(MyForm item)
 {
     if (!string.IsNullOrWhiteSpace(item?.Message))
     {
         Session["message"] = item.Message;
     }
     return(RedirectToAction("Index"));
 }
Beispiel #17
0
 public void DestroyForm()
 {
     if (_currForm != null)
     {
         _currForm.Destroy();
         _currForm = null;
     }
 }
    public MyForm() : base()
    {
        InitializeComponent();

        // ....

        instance = this;
    }
 // Program entry point, runs event loop for the form that excercises out component
 public static void Main(string[] args)
 {
     Control.CheckForIllegalCrossThreadCalls = true;
     Application.EnableVisualStyles();
     using (var form = new MyForm())
     {
         Application.Run(form);
     }
 }
Beispiel #20
0
 public FormHandler()
 {
     Control = new MyForm {
         StartPosition = swf.FormStartPosition.CenterParent,
         AutoSize      = true,
         Size          = sd.Size.Empty,
         MinimumSize   = sd.Size.Empty
     };
 }
        public void Can_CreateForm()
        {
            using (var form = new MyForm()) {
                form.Show();
                form.Update();

                ThreadTool.Sleep(5000);
            }
        }
Beispiel #22
0
        private void button1_Click(object sender, EventArgs e)
        {
            Form2 form2 = new Form2();

            form2.Show();
            MyForm form = new MyForm();

            form.Show();
        }
Beispiel #23
0
        public VyborViborok(MyForm myform)
        {
            _myform = myform;

            InitializeComponent();

            comboBox1.Items.AddRange(_myform.viborki.Select(x => x.Name).ToArray());

            comboBox2.Items.AddRange(_myform.viborki.Select(x => x.Name).ToArray());
        }
Beispiel #24
0
        public Form_First()
        {
            InitializeComponent();
            this.IsMdiContainer = true;
            MyForm form = new MyForm();

            form.Text      = "MyForm";
            form.MdiParent = this;
            form.Show();
        }
Beispiel #25
0
    private void Page_Init(object sender, EventArgs e)
    {
        this.Load += new System.EventHandler(this.Page_Load);

        myFormObj  = new MyForm();
        label1     = new Label();
        label2     = new Label();
        textBoxObj = new TextBox();
        buttonObj  = new Button();
    }
Beispiel #26
0
    public void DestroyCurrentMenu()
    {
        if (current == null)
        {
            return;
        }

        current.Destroy();
        current = null;
    }
 public ActionResult Edit([Bind(Include = "Id,FormName,FormLayout,IsActive")] MyForm myForm)
 {
     if (ModelState.IsValid)
     {
         db.Entry(myForm).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(myForm));
 }
 public static int GetResult()
 {
     using (MyForm myForm = new MyForm())
     {
         if (myForm.ShowDialog == DialogResult.OK)
         {
             return(myForm.MyValue);
         }
     }
     return(-1);
 }
Beispiel #29
0
 private void MakeSubFormsClickableOrUnclickable()
 {
     foreach (Form f in Application.OpenForms)
     {
         if (f is MyForm)
         {
             MyForm myf = f as MyForm;
             myf.clickableCheckBox.Checked = !myf.clickableCheckBox.Checked;
         }
     }
 }
        public ActionResult Create([Bind(Include = "Id,FormName,FormLayout,IsActive")] MyForm myForm)
        {
            if (ModelState.IsValid)
            {
                db.MyForms.Add(myForm);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(myForm));
        }
 protected void AddErrorMsg(string msg)
 {
     try
     {
         MyForm.BeginInvoke(new Action(() =>
         {
             MyForm.RtxtError.AppendText(msg);
         }));
     }
     catch { }
 }
Beispiel #32
0
    /// <summary>
    /// CAlled from Release loading screen, only needed for 2nd game loaded
    /// </summary>
    internal void ReActivateGUIIfNeeded()
    {
        main.Destroy();
        main = null;
        LoadMainGUI();

        if (main != null)
        {
            ShowMainGUI();
        }
    }
		public WinUsbDeviceMonitor ()
		{
            this.Enabled = false;

            form = new MyForm();
			form.Monitor = this;

            //Move main form off the screen
            form.StartPosition = FormStartPosition.Manual;
            form.Width = 10;
            form.Height = 10;
            form.Left = -200;
            form.ShowInTaskbar = false;

			form.Visible = true;
			form.Visible = false;
		}
Beispiel #34
0
 private static void SynchronizationContextTaskScheduler() {
    var f = new MyForm();
    System.Windows.Forms.Application.Run();
 }
Beispiel #35
0
 public static void Main()
 {
     MyForm f1=new MyForm();
     Application.Run(f1);
 }