Example #1
0
        /// <summary>
        /// Creates a histogram image of the provided width and height, with bins shown as vertical black bars on a white background.
        /// </summary>
        /// <param name="histogramValues">The list of bin counts</param>
        /// <param name="width">Width of the output image</param>
        /// <param name="height">Height of the output image</param>
        /// <returns>A histogram image</returns>
        public static Bitmap CreateHistogramImage(this IEnumerable <int> histogramValues, int width, int height)
        {
            Bitmap image = new Bitmap(width, height);

            int[] histogram = histogramValues.ToArray();
            var   brushes   = Enumerable.Range(1, histogram.Length + 1).Select(o =>
            {
                var color = LabelDictionary.LabelToColor((short)o);
                return(new SolidBrush(System.Drawing.Color.FromArgb(color.R, color.G, color.B)));
            }).ToArray();

            Graphics g = Graphics.FromImage(image);

            g.FillRectangle(System.Drawing.Brushes.White, 0, 0, width, height);

            float binWidth = (float)width / histogram.Length;
            float max      = histogram.Max();

            float x = 0;

            for (int i = 0; i < histogram.Length; i++)
            {
                float binHeight = histogram[i] * height / max;
                float y         = height - binHeight;
                g.FillRectangle(brushes[i], x, y, binWidth, binHeight);
                x += binWidth;
            }

            return(image);
        }
Example #2
0
 public PartialViewResult Restore(RestoreModel model)
 {
     if (model.Email.IsNullOrEmpty() || !model.Email.IsMailAdress())
     {
         ModelState.AddModelError("",
                                  LabelDictionary.Translate(
                                      "Для восстановления пароля необходимо указать Email, использованный при регистрации"));
     }
     else
     {
         var user = Membership.GetUser(model.Email);
         if (user == null)
         {
             ModelState.AddModelError("",
                                      LabelDictionary.Translate(
                                          "Пользователь с таким Email не регистрировался на сайте"));
         }
         else
         {
             var res = MailingList.Get("RestorePassLetter")
                       .To(model.Email)
                       .WithReplacement(new MailReplacement("{PASSWORD}", user.GetPassword())).Send();
             ModelState.AddModelError("",
                                      res.IsFilled()
                                          ? res
                                          : LabelDictionary.Translate(
                                          "Пароль для доступа к сайту был успешно отправлен на указанный Email"));
         }
     }
     return(PartialView(model));
 }
        public ActionResult Index(int?page)
        {
            LabelDictionary.SynchronizeDicts();
            var db   = new DB();
            var dict = db.LabelDictionaries.OrderBy(x => x.TextKey);

            return(View(new PagedData <LabelDictionary>(dict, page ?? 0, 30)));
        }
        public ContentResult Translate(int langID, string key)
        {
            var dict = LabelDictionary.GetDictionary(langID);

            return(new ContentResult()
            {
                Content = LabelDictionary.Translate(key, dict, langID)
            });
        }
Example #5
0
        /*
         * Constructor
         */

        public SubListViewItemCIO(PhoneListViewCIO parent,
                                  PhoneListViewCIO subList,
                                  LabelDictionary dict)
        {
            _parentList = parent;
            _subList    = subList;
            _labels     = dict;

            ((PhoneListView)_subList.GetControl()).BackButtonPressed +=
                new KeyPressEventHandler(this.backButtonPress);
        }
Example #6
0
        /*
         * Constructor
         */
        public TabbedLinkedCIO(ApplianceObject ao)
            : base(ao, new System.Windows.Forms.Panel())
        {
            ApplianceState state = (ApplianceState)GetApplObj();
            Panel          panel = (Panel)GetControl();

            _tabControl = new TabControl();
            panel.Controls.Add(_tabControl);

            _tabControl.Location = new System.Drawing.Point(0, 0);
            _tabControl.Size     = panel.ClientSize;

            panel.Resize += new EventHandler(this.Resized);

            _panelCIOs = new ArrayList();

            object          stateval = state.Value;
            EnumeratedSpace espc     = (EnumeratedSpace)state.Type.ValueSpace;
            Hashtable       labels   = state.Type.ValueLabels;

            int labelWidth = _tabControl.ClientSize.Width / espc.GetItemCount();

            for (int i = 1; i <= espc.GetItemCount(); i++)
            {
                object          labelSpace = i;
                LabelDictionary ldict      = (LabelDictionary)labels[labelSpace];

                TabbedPanelCIO pageCIO = new TabbedPanelCIO(ldict);

                TabPage page = pageCIO.TabPage;
                page.Enabled = ldict.Enabled;

                _tabControl.Controls.Add(page);
                _panelCIOs.Add(pageCIO);

                pageCIO.ChooseLabel(labelWidth - 2 * MINIMUM_TAB_PAD);

                if (state.Defined && i == (int)stateval)
                {
                    _tabControl.SelectedIndex = i - 1;
                }
            }

            state.LabelChangedEvent  += new ApplianceObject.LabelChangedHandler(this.LabelChanged);
            state.EnableChangedEvent += new ApplianceObject.EnableChangedHandler(this.EnableChanged);
            state.TypeChangedEvent   += new ApplianceState.TypeChangedHandler(this.TypeChanged);
            state.ValueChangedEvent  += new ApplianceState.ValueChangedHandler(this.ValueChanged);

            _tabControl.SelectedIndexChanged += new EventHandler(this.SelectedIndexChanged);

            refreshDisplay();
        }
Example #7
0
        /*
         * Constructor
         */

        public PanelListViewItemCIO(PhoneListViewCIO parentList,
                                    LabelDictionary labels)
        {
            _parentList = parentList;
            _labels     = labels;
            _panel      = new ScrollingPanelCIO();

            /*
             * _panel = new PanelCIO( new PhonePanel() );
             * ((PhonePanel)_panel.GetControl()).BackButtonPressed +=
             *      new KeyPressEventHandler(this.backButtonPress);
             */
        }
Example #8
0
        private void CheckStateEnable()
        {
            bool enable = _state.Enabled;

            if (!enable)
            {
                _button.Enabled = false;
                return;
            }

            LabelDictionary labelDict = (LabelDictionary)_state.Type.ValueLabels[_value];

            _button.Enabled = labelDict.Enabled;
        }
Example #9
0
 public static void Reset()
 {
     Process              = null;
     ConstantData         = null;
     GameBaseData         = null;
     EMediator            = null;
     VEvaluator           = null;
     VariableData         = null;
     Console              = null;
     MainWindow           = null;
     LabelDictionary      = null;
     IdentifierDictionary = null;
     tempDic.Clear();
 }
Example #10
0
        protected void createButtonsFromState()
        {
            if (_playState == null)
            {
                return;
            }

            doNotRenderObject(_playState);

            Hashtable   labels = _playState.Type.ValueLabels;
            IEnumerator keys   = labels.Keys.GetEnumerator();

            while (keys.MoveNext())
            {
                object          value     = keys.Current;
                LabelDictionary labelDict = (LabelDictionary)labels[value];

                if (labelDict.Contains(PLAY_LABEL))
                {
                    _playBtn = createImageButton(PLAY_IMG_NAME);
                    _mediaActions.Add(new MediaStateValueAction(_playBtn, _playState, value, PLAY_LABEL));
                }
                else if (labelDict.Contains(STOP_LABEL))
                {
                    _stopBtn = createImageButton(STOP_IMG_NAME);
                    _mediaActions.Add(new MediaStateValueAction(_stopBtn, _playState, value, STOP_LABEL));
                }
                else if (labelDict.Contains(PAUSE_LABEL))
                {
                    _pauseBtn = createImageButton(PAUSE_IMG_NAME);
                    _mediaActions.Add(new MediaStateValueAction(_pauseBtn, _playState, value, PAUSE_LABEL));
                }
                else if (labelDict.Contains(REWIND_LABEL))
                {
                    _rewindBtn = createImageButton(REWIND_IMG_NAME);
                    _mediaActions.Add(new MediaStateValueAction(_rewindBtn, _playState, value, REWIND_LABEL));
                }
                else if (labelDict.Contains(FFWD_LABEL))
                {
                    _fastFwdBtn = createImageButton(FFWD_IMG_NAME);
                    _mediaActions.Add(new MediaStateValueAction(_fastFwdBtn, _playState, value, FFWD_LABEL));
                }
                else if (labelDict.Contains(RECORD_LABEL))
                {
                    _recordBtn = createImageButton(RECORD_IMG_NAME);
                    _mediaActions.Add(new MediaStateValueAction(_recordBtn, _playState, value, RECORD_LABEL));
                }
            }
        }
Example #11
0
        public int AddTab(TabbedPanelCIO panelCIO)
        {
            TabPage page = panelCIO.TabPage;

            _cios.Add(panelCIO);
            _tabControl.Controls.Add(page);

            LabelDictionary labels = panelCIO.Labels;

            panelCIO.ResolveEnabled();
            panelCIO.ChooseLabel(0);

            refreshDisplay();

            return(_cios.Count - 1);
        }
Example #12
0
        /*
         * Constructors
         */

        public ImageListSmartCIO(GroupNode specSnippet)
            : base(new ThumbnailViewer(), specSnippet)
        {
            if (specSnippet.IsObject())
            {
                _imageState = (ApplianceState)_objects[SINGLE_STATE];
            }
            else
            {
                _imageState = (ApplianceState)_objects[IMAGE_STATE_NAME];

                // look for labels in state if none were found in group
                if (_labels == null)
                {
                    _labels = _imageState.Labels;
                }
            }

            // move template group above list-group
            ((BranchGroupNode)_specSnippet).Children.Remove(_templateGroup);

            int parentIdx = _specSnippet.Parent.Children.IndexOf(_specSnippet, 0, _specSnippet.Parent.Count);

            if (parentIdx < 0)
            {
                parentIdx = 0;
            }

            _specSnippet.Parent.Children.Insert(parentIdx + 1, _templateGroup);
            _templateGroup.Parent = _specSnippet.Parent;

            // add labels to template and list groups
            LabelDictionary ldict = new LabelDictionary();

            ldict.AddLabel(new StringValue("Detail View"));
            _specSnippet.Labels = ldict;

            ldict = new LabelDictionary();
            ldict.AddLabel(new StringValue("Thumbnails"));
            _templateGroup.Labels = ldict;

            // register event handlers
            ((ListGroupNode)_specSnippet).SelectionState.ValueChangedEvent += new PUC.ApplianceState.ValueChangedHandler(SelectionChanged);
            ((ThumbnailViewer)_control).SelectedIndexChanged += new EventHandler(SelectedIndexChanged);

            _imageState.VariableTable.BinaryDataChanged += new PUC.VariableTable.BinaryEventHandler(VariableTable_BinaryDataChanged);
        }
Example #13
0
        /*
         * Process Method
         */

        public override ConcreteInteractionObject Process(ListItemNode node,
                                                          ConcreteInteractionObject cio,
                                                          UIGenerator ui)
        {
            if (node.Decorations[ItemDecision.DECISION_KEY] == null &&
                node is StateValueListNode &&
                cio is PhoneListViewCIO)
            {
                // the item node represents an appliance object and it will be
                // contained within a list
                StateValueListNode newList = (StateValueListNode)node;
                PhoneListViewCIO   list    = (PhoneListViewCIO)cio;

                PhoneListViewCIO subList = new PhoneListViewCIO();

                LabelDictionary labels = null;

                if (newList.State.Type.ValueLabels != null)
                {
                    labels =
                        (LabelDictionary)newList.State.Type.ValueLabels[newList.Value];
                }

                if (labels == null)
                {
                    labels = new LabelDictionary();
                    labels.AddLabel(new StringValue(newList.Value.ToString()));
                }

                IPhoneListViewItem listItem =
                    new SubListViewItemCIO(list, subList, labels);

                ItemActivationListener l = new ItemActivationListener(newList.State,
                                                                      newList.Value);

                listItem.ItemActivated += new EventHandler(l.itemActivated);

                list.AddItem(listItem);
                newList.Decorations[ItemDecision.DECISION_KEY] =
                    new ListItemDecision(listItem);

                return(subList);
            }

            return(cio);
        }
Example #14
0
        public SmartCIO(Control control, GroupNode specSnippet)
            : base(control)
        {
            _specSnippet = specSnippet;

            // attempt to find labels
            if (!specSnippet.IsObject())
            {
                _labels = specSnippet.Labels;
            }
            else if (specSnippet.IsObject())
            {
                _labels = ((ObjectGroupNode)specSnippet).Object.Labels;
            }

            // create the Template group
            _templateGroup = new BranchGroupNode();


            // extract the objects that make up this type block
            _objects = new Hashtable();
            if (_specSnippet.IsObject())
            {
                _objects[SINGLE_STATE] = ((ObjectGroupNode)specSnippet).Object;

                // determine the location of this group in its parent
                int parentIdx = _specSnippet.Parent.Children.IndexOf(_specSnippet);
                if (parentIdx < 0)                   // this should never happen
                {
                    parentIdx = 0;
                }

                // make the template group
                _specSnippet.Parent.Children.Insert(parentIdx + 1, _templateGroup);
                _templateGroup.Parent = _specSnippet.Parent;
            }
            else
            {
                extractObjects(specSnippet);

                // make the template group
                ((BranchGroupNode)specSnippet).Children.Add(_templateGroup);
                _templateGroup.Parent = (BranchGroupNode)_specSnippet;
            }
        }
Example #15
0
        public List <string> GetOverloadedList(LabelDictionary labelDic)
        {
            List <string> list = new List <string>();

            foreach (KeyValuePair <string, FunctionMethod> pair in methodDic)
            {
                FunctionLabelLine func = labelDic.GetNonEventLabel(pair.Key);
                if (func == null)
                {
                    continue;
                }
                if (!func.IsMethod)
                {
                    continue;
                }
                list.Add(pair.Key);
            }
            return(list);
        }
Example #16
0
        public List <string> GetOverloadedList(LabelDictionary labelDic)
        {
            var list = new List <string>();

            foreach (var pair in methodDic)
            {
                var func = labelDic.GetNonEventLabel(pair.Key);
                if (func == null)
                {
                    continue;
                }
                if (!func.IsMethod)
                {
                    continue;
                }
                list.Add(pair.Key);
            }
            return(list);
        }
Example #17
0
        /*
         * Properties
         */

        /*
         * Member Methods
         */

        protected void createButtonsFromState()
        {
            if (_playState == null)
            {
                return;
            }

            _playState.ValueChangedEvent += new PUC.ApplianceState.ValueChangedHandler(_playState_ValueChangedEvent);

            Hashtable   labels = _playState.Type.ValueLabels;
            IEnumerator keys   = labels.Keys.GetEnumerator();

            while (keys.MoveNext())
            {
                object           value     = keys.Current;
                LabelDictionary  labelDict = (LabelDictionary)labels[value];
                MediaStateAction m;

                if (labelDict.Contains(PLAY_LABEL))
                {
                    _valueToTypeMap[PLAY_LABEL] = value;
                    m = new MediaStateAction(_playState, value);
                    ((PhoneMediaControls)GetControl()).Play += new EventHandler(m.Activate);
                }
                else if (labelDict.Contains(STOP_LABEL))
                {
                    _valueToTypeMap[STOP_LABEL] = value;
                    m = new MediaStateAction(_playState, value);
                    ((PhoneMediaControls)GetControl()).Stop += new EventHandler(m.Activate);
                }
                else if (labelDict.Contains(PAUSE_LABEL))
                {
                    _valueToTypeMap[PAUSE_LABEL] = value;
                    m = new MediaStateAction(_playState, value);
                    ((PhoneMediaControls)GetControl()).Pause += new EventHandler(m.Activate);
                }
            }
        }
Example #18
0
        /*
         * Member Methods
         */

        protected void refreshDisplay()
        {
            ApplianceState state = (ApplianceState)GetApplObj();

            string lbl;

            if (!state.Defined)
            {
                lbl = "";
            }
            else if (state.Type.ValueLabels == null)
            {
                lbl = state.Value.ToString();
            }
            else
            {
                // find the right label library
                LabelDictionary labels = (LabelDictionary)state.Type.ValueLabels[state.Value];

                if (labels == null)
                {
                    lbl = state.Value.ToString();
                }
                else
                {
                    try
                    {
                        lbl = labels.GetLabelByPixelLength(GetControl().Font, GetControl().ClientSize.Width);
                    }
                    catch (Exception)
                    {
                        lbl = labels.GetShortestLabel();
                    }
                }
            }

            GetControl().Text = lbl;
        }
Example #19
0
        /*
         * Constructor
         */
        public LabelCIO(LabelDictionary labels) : base(new Label())
        {
            _labels = labels;

            GetControl().Text = _labels.GetShortestLabel();
        }
Example #20
0
        public IOperandTerm GetFunctionMethod(LabelDictionary labelDic, string codeStr, IOperandTerm[] arguments, bool userDefinedOnly)
        {
            if (Config.ICFunction)
            {
                codeStr = codeStr.ToUpper();
            }
            if (arguments == null)            //引数なし、名前のみの探索
            {
                if (refmethodDic.ContainsKey(codeStr))
                {
                    return(new UserDefinedRefMethodNoArgTerm(refmethodDic[codeStr]));
                }
                return(null);
            }
            if ((labelDic != null) && (labelDic.Initialized))
            {
                if (refmethodDic.ContainsKey(codeStr))
                {
                    return(new UserDefinedRefMethodTerm(refmethodDic[codeStr], arguments));
                }
                FunctionLabelLine func = labelDic.GetNonEventLabel(codeStr);
                if (func != null)
                {
                    if (userDefinedOnly && !func.IsMethod)
                    {
                        throw new CodeEE("#FUNCTIONが指定されていない関数\"@" + func.LabelName + "\"をCALLF系命令で呼び出そうとしました");
                    }
                    if (func.IsMethod)
                    {
                        string       errMes;
                        IOperandTerm ret = UserDefinedMethodTerm.Create(func, arguments, out errMes);
                        if (ret == null)
                        {
                            throw new CodeEE(errMes);
                        }
                        return(ret);
                    }
                    //1.721 #FUNCTIONが定義されていない関数は組み込み関数を上書きしない方向に。 PANCTION.ERBのRANDとか。
                    if (!methodDic.ContainsKey(codeStr))
                    {
                        throw new CodeEE("#FUNCTIONが定義されていない関数(" + func.Position.Filename + ":" + func.Position.LineNo + "行目)を式中で呼び出そうとしました");
                    }
                }
            }
            if (userDefinedOnly)
            {
                return(null);
            }
            FunctionMethod method = null;

            if (!methodDic.TryGetValue(codeStr, out method))
            {
                return(null);
            }
            string errmes = method.CheckArgumentType(codeStr, arguments);

            if (errmes != null)
            {
                throw new CodeEE(errmes);
            }
            return(new FunctionMethodTerm(method, arguments));
        }
Example #21
0
 public static string LevelString(Level level)
 {
     return((LabelDictionary.ContainsKey(level)) ? LabelDictionary[level] : "[NONE ]: ");
 }
 public static MvcHtmlString LangLabel(this HtmlHelper helper, string text)
 {
     return(new MvcHtmlString(LabelDictionary.Translate(text)));
 }
Example #23
0
        /*
         * Constructor
         */

        public TabbedPanelCIO(LabelDictionary labels) : base(new TabPage())
        {
            _labels = labels;

            GetControl().Text = _labels.GetShortestLabel();
        }
Example #24
0
        /*
         * Member Methods
         */

        protected void typeChangeRefresh()
        {
            ApplianceState state = (ApplianceState)GetApplObj();
            ComboBox       cbox  = (ComboBox)GetControl();

            try
            {
                Hashtable labels = state.Type.ValueLabels;

                /*
                 * This code may cause unneccesary flicker when displaying the
                 * ComboBox.  If it does, changes should be made here to add and
                 * remove items based upon change in the state and its dependencies.
                 */

                object stateval = state.Value;

                if (state.Type.ValueSpace is PUC.Types.EnumeratedSpace)
                {
                    PUC.Types.EnumeratedSpace espc = (PUC.Types.EnumeratedSpace)state.Type.ValueSpace;

                    //cbox.BeginUpdate();

                    cbox.Items.Clear();
                    _itemIndexMap.Clear();
                    _indexItemMap.Clear();

                    for (int i = 1; i <= espc.GetItemCount(); i++)
                    {
                        object          labelSpace = i;
                        LabelDictionary ldict      = (LabelDictionary)labels[labelSpace];

                        if (ldict.Enabled ||
                            (state.Defined && i == (int)stateval))
                        {
                            string label = ldict.GetLabelByPixelLength(cbox.Font,
                                                                       cbox.ClientSize.Width);

                            cbox.Items.Add(label);
                            _itemIndexMap[cbox.Items.Count - 1] = i;
                            _indexItemMap[i] = cbox.Items.Count - 1;

                            if (state.Defined && i == (int)stateval)
                            {
                                cbox.SelectedIndex = cbox.Items.Count - 1;
                            }
                        }
                    }


                    if (!state.Defined)
                    {
                        object          labelSpace = LabelDictionary.UndefinedToken;
                        LabelDictionary ldict      = (LabelDictionary)labels[labelSpace];

                        if (ldict != null)
                        {
                            string label = ldict.GetLabelByPixelLength(cbox.Font,
                                                                       cbox.ClientSize.Width);

                            cbox.Items.Add(label);
                            cbox.SelectedIndex = cbox.Items.Count - 1;
                        }
                    }


                    //cbox.EndUpdate();
                }
                else if (state.Type.ValueSpace is PUC.Types.BooleanSpace)
                {
                    // cbox.BeginUpdate();

                    cbox.Items.Clear();
                    _itemIndexMap.Clear();
                    _indexItemMap.Clear();
                    for (int i = 0; i < 2; i++)
                    {
                        object          labelSpace = (i == 1);
                        LabelDictionary ldict      = (LabelDictionary)labels[labelSpace];

                        if (ldict.Enabled)
                        {
                            string label = ldict.GetLabelByPixelLength(cbox.Font,
                                                                       cbox.Size.Width - MINIMUM_LEFT_PAD - MINIMUM_RIGHT_PAD);

                            cbox.Items.Add(label);
                            _itemIndexMap[cbox.Items.Count - 1] = (i == 1);
                            _indexItemMap[(i == 1)]             = cbox.Items.Count - 1;

                            if (state.Defined && (i == 1) == (bool)stateval)
                            {
                                cbox.SelectedIndex = cbox.Items.Count - 1;
                            }
                        }
                    }

                    // TODO: think of a better way to do this
                    // Currently undefined labels won't work
                    if (!state.Defined)
                    {
                        object          labelSpace = LabelDictionary.UndefinedToken;
                        LabelDictionary ldict      = (LabelDictionary)labels[labelSpace];

                        if (ldict != null)
                        {
                            string label = ldict.GetLabelByPixelLength(cbox.Font,
                                                                       cbox.ClientSize.Width);

                            cbox.Items.Add(label);
                            cbox.SelectedIndex = cbox.Items.Count - 1;
                        }
                    }


                    // cbox.EndUpdate();
                }
                else
                {
                    Globals.GetFrame(GetApplObj().Appliance)
                    .AddLogLine("SelectionListLinkedCIO does not know how to handle non-boolean/enumerated spaces");
                }
            }
            catch (Exception)
            {
                cbox.Items.Add("--");
            }
        }
Example #25
0
        /*
         * Constructor
         */

        public OneDimCategoricalList(ListGroupNode g)
            : base(new Panel())
        {
            Panel p = (Panel)this.GetControl();

            _listGroup  = g;
            _listLabels = _listGroup.Labels;

            // for efficiency, disconnect data windows to internal states
            _listGroup.DataWindow.Clear();

            System.Drawing.SizeF size;

            _listView               = new ListView();
            _listView.View          = View.Details;
            _listView.FullRowSelect = true;
            p.Controls.Add(_listView);

            if (_listLabels != null)
            {
                _listLabel          = new Label();
                _listLabel.Text     = _listLabels.GetShortestLabel();
                _listLabel.Location = new System.Drawing.Point(0, 0);
                size            = Globals.MeasureString(_listLabel.Text, _listLabel.Font);
                _listLabel.Size = new System.Drawing.Size((int)size.Width, (int)size.Height);
                p.Controls.Add(_listLabel);
                _listView.Location = new System.Drawing.Point(0, _listLabel.Height + 3);
            }
            else
            {
                _listView.Location = new System.Drawing.Point(0, 0);
            }

            p.Resize += new EventHandler(p_Resize);

            // determine if multiple selection is being used

#if POCKETPC
            // the CheckBoxes property allows multiple selection on a PocketPC
            _listView.CheckBoxes
#endif
#if DESKTOP
            _listView.MultiSelect
#endif
                = _listGroup.SelectionType == SelectionType.Multiple;

            // extract the states

            _states = new ArrayList();
            extractStates(_listGroup, true);

            // identify the columns and set them up

            IEnumerator states = _states.GetEnumerator();
            while (states.MoveNext())
            {
                ApplianceState s  = (ApplianceState)states.Current;
                ColumnHeader   ch = new ColumnHeader();
                ch.Text  = s.Labels.GetShortestLabel();
                ch.Width = 20;
                _listView.Columns.Add(ch);
            }

            // hook into appropriate events

            _listGroup.ListDataChanged += new ListEvent(_listGroup_ListDataChanged);
            _listGroup.SelectionState.ValueChangedEvent += new PUC.ApplianceState.ValueChangedHandler(SelectionState_ValueChangedEvent);
            _listView.SelectedIndexChanged += new EventHandler(_listView_SelectedIndexChanged);
        }
Example #26
0
        /*
         * Constructor
         */

        public PanelListNode(LabelDictionary labels)
        {
            _labels = labels;
        }
Example #27
0
        /*
         * Constructor
         */

        public LabeledListNode(LabelDictionary labels)
        {
            _labels = labels;
        }