예제 #1
0
 public InsertionPanelTemplate(TemplateUnitBase tu,
                               Control ctrl,
                               ref int offsetY, int height, Color?colorback = null)
     : base(tu, ctrl, tu.Metas["varPathStored"], ref offsetY, height, colorback)
 {
     txt.Text    = tu.TemplateFileName;
     txt.Enabled = false;
 }
예제 #2
0
        public ToxicFormMain(TemplateUnitBase tu,
                             string text = "", string title = "") : base(tu)
        {
            InitializeComponent();

            #region visual
            this.Text = text == "" ? DEFTEXT : text;
            //title
            Rectangle r = Screen.FromControl(this).Bounds;
            hp = r.Height / 100;
            wp = r.Width / 100;

            this.MinimumSize = new Size(wp * 80, hp * 50);
            Icon             = new System.Drawing.Icon(Assembly.GetExecutingAssembly().GetManifestResourceStream("VAB.Ui.icon.ico"));
            Panel back = new Panel();
            back.Dock = DockStyle.Fill;
            var rrr = this.BackColor;
            this.Controls.Add(back);
            Panel P = new Panel();
            P.Name       = "OuR Canvas";
            P.Height     = 10000;
            P.Width      = back.Width;
            P.Location   = new Point(0, 0);
            P.MouseDown += new MouseEventHandler(P_MouseDown);
            P.MouseMove += new MouseEventHandler(P_MouseMove);
            P.MouseUp   += new MouseEventHandler(P_MouseUp);
            back.Controls.Add(P);
            canvas       = P;
            this.Resize += new EventHandler((s, v) =>
            {
                back.Height  = this.ClientRectangle.Height - 66;
                back.Width   = this.ClientRectangle.Width - 13;
                canvas.Width = back.Width;
            });

            Width       = wp * 70;
            Height      = hp * 60;
            MinimumSize = new System.Drawing.Size(600, Height);
            MaximumSize = new System.Drawing.Size(10000, Height);
            #endregion

            this.Load += new EventHandler(ToxicForm_Load);
            TU         = tu;

            try
            {
                System.Windows.Forms.Application.Run(this);
            }
            catch
            {
                try
                {
                    Show();
                }
                catch { }
            }
        }
예제 #3
0
        public InsertionPanelField(TemplateUnitBase tu,
                                   Control ctrl, string caption,
                                   ref int offsetY, int height, Color?colorback = null)
        {
            TU = tu;

            capt            = caption;
            parentc         = ctrl;
            parentc.Resize += new EventHandler((s, v) => { FitResized(); });

            this.BackColor = (colorback != null) ? colorback.Value : BCOLpanel;
            this.ForeColor = FCOL;
            this.Location  = new Point(-1, offsetY);
            this.Height    = height;
            this.Width     = ctrl.Width + 2;

            #region Visual
            Label l = new Label();
            l.Font     = new Font(Font, FontStyle.Bold);
            l.Text     = capt + " : ";
            l.Width    = (Int32)l.CreateGraphics().MeasureString(l.Text, l.Font).Width + 10;
            l.Location = new Point(100 - l.Width, 8);
            this.Controls.Add(l);
            lcaption = l;
            TextBox tb = new TextBox();
            tb.Name        = CONTENT_HOLDER_NAME;
            tb.Font        = new Font(Font, FontStyle.Bold);
            tb.BackColor   = BCOLpanel;
            tb.BorderStyle = BorderStyle.FixedSingle;
            tb.Width       = this.Width - 200;
            tb.Location    = new Point(100, 4);
            this.Controls.Add(tb);
            txt = tb;
            Label br = new Label();
            br.Name      = "open";
            br.Font      = new Font("Tahoma", 8.25f, FontStyle.Bold);
            br.BackColor = BCOLbutton;
            br.Location  = new Point(this.Width - 75, 4);
            br.Width     = 40;
            br.Height    = 20;
            br.Text      = "    ...";
            br.Cursor    = Cursors.Hand;
            this.Controls.Add(br);
            ljob           = br;
            br.MouseClick += new MouseEventHandler(Browse_MouseClick);
            #endregion

            offsetY += this.Height;
            parentc.Controls.Add(this);
            ipanels.Add(ipanels.Count, this);
        }
예제 #4
0
 public ToxicFormBase(TemplateUnitBase tu) : base()
 {
     TU = tu;
     insertionPanels = new List <InsertionPanelBase>();
     templatePanels  = new List <InsertionPanelBase>();
 }
예제 #5
0
 public InsertionPanelFieldIconPath(TemplateUnitBase tu,
                                    Control ctrl, string caption,
                                    ref int offsetY, int height, Color?colorback = null)
     : base(tu, ctrl, caption, ref offsetY, height, colorback)
 {
 }