Exemplo n.º 1
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            stage.MainStage.Width  = Convert.ToInt32(txt_w.Text);
            stage.MainStage.Height = Convert.ToInt32(txt_h.Text);
            bool b = false;

            if (rd_pic.IsChecked == true)
            {
                b = true;
            }
            var brs = (SolidColorBrush)brd_color.Background;

            stage.SetBg(b, brs.Color, txt_pic.Text);
            this.Close();
        }
Exemplo n.º 2
0
        public void LoadFile(string fname)
        {
            JWCSerializer <JWCSaveFile> jse = new JWCSerializer <JWCSaveFile>();
            JWCSaveFile file = jse.Deserialize(fname);

            stage.ClearAll(file.Width, file.Height);

            foreach (var s in file.AllControls)
            {
                string     fullname = s["FullName"].ToString();
                JWCControl jc       = JWCControlFactory.CreateInstance(fullname);
                jc.InputProperty(s);
                jc.IsEditMode = true;
                jc.Init(true);
                stage.AddControl(jc);
            }
            Color cl = Color.FromArgb(file.BackColor[0], file.BackColor[1], file.BackColor[2], file.BackColor[3]);

            stage.SetBg(file.BgUsePic, cl, file.BackGroundPic);
            commu    = file.Communicator;
            adapter  = file.ComAdapter;
            ComFname = file.ComName;
            AdaFname = file.AdaName;
        }