예제 #1
0
        public MainFormVM()
        {
            enable_update = true;
            Labels        = new DropShadownLabelVM[info_count];
            for (int i = 0; i < Labels.Length; i++)
            {
                Labels[i]      = new DropShadownLabelVM();
                Labels[i].Text = "N/A";
            }

            LeftBar   = new PlainVerticalBarVM();
            MiddleBar = new PlainVerticalBarVM();
            RightBar  = new PlainVerticalBarVM();

            Pump = new PlainVerticalBarVM();


            Pump.Min   = 0;
            Pump.Max   = 4096;
            Pump.Value = 0;

            LeftBar.Min   = 0;
            LeftBar.Max   = 900;
            LeftBar.Value = 0;

            MiddleBar.Min   = 0;
            MiddleBar.Max   = 400;
            MiddleBar.Value = 0;

            RightBar.Min   = 0;
            RightBar.Max   = 400;
            RightBar.Value = 0;
        }
예제 #2
0
        void InitializeComponent()
        {
            if (model == null)
            {
                model = new PlainVerticalBarVM();
            }

            suppress_invalidate = false;

            Size = new Size(20, 133);

            mRemote = false;

            model.Min   = 0.0;
            model.Max   = 100.0;
            model.Value = 75.0;

            model.PropertyChanged += Model_PropertyChanged;


            mBarBackColor         = Colors.Black;
            mDataFadeColor        = Color.FromRgb(0x400000);
            mDataColor            = Colors.Red;
            mBoxBorderTopLeft     = Colors.WhiteSmoke;
            mBoxBorderBottomRight = Colors.DarkGray;

            BarBackBrush   = new SolidBrush(mBarBackColor);
            TopLeftPen     = new Pen(mBoxBorderTopLeft);
            BottomRightPen = new Pen(mBoxBorderBottomRight);


            FillBrush = new SolidBrush(mDataColor);

            resource_count = 0;
            brush_width    = int.MinValue;

#if Drawable
            GraphBox              = new Drawable();
            GraphBox.Paint       += GraphBox_Paint;
            GraphBox.SizeChanged += GraphBox_SizeChanged;
            use_creategraphics    = GraphBox.SupportsCreateGraphics;

            Content = GraphBox;
#else
            GraphBar              = new ProgressBar();
            GraphBar.SizeChanged += GraphBox_SizeChanged;
            GraphBar.MinValue     = 0;
            GraphBar.MaxValue     = pbarrange;
            GraphBar.Value        = 0;
            GraphBar.Style        = "vertical_bar";


            Content = GraphBar;
#endif



            DataBrush = null;
            CalculateScaling();
        }
예제 #3
0
 public PlainVerticalBar(PlainVerticalBarVM M)
 {
     model = M;
     InitializeComponent();
 }