public static TextStylusModel GetInstance() { if (text_model_ == null) { text_model_ = new TextStylusModel(Guid.NewGuid()); } return text_model_; }
public static TextStylusModel GetInstance() { if (text_model_ == null) { text_model_ = new TextStylusModel(Guid.NewGuid()); } return(text_model_); }
/// <summary> /// Constructor /// </summary> /// <param name="model">The presenter model</param> public StylusToolBarButtons(PresenterModel model) { this.m_Model = model; // Initialize the stylus models. this.m_PenModel = new PenStylusModel(Guid.NewGuid()); this.m_HighlighterModel = new PenStylusModel(Guid.NewGuid()); this.m_EraserModel = new EraserStylusModel(Guid.NewGuid()); // Comment out as it is not being used currently //this.m_LassoModel = new LassoStylusModel(Guid.NewGuid()); this.m_ImageModel = new ImageStylusModel(Guid.NewGuid()); this.m_TextModel = TextStylusModel.GetInstance(); this.m_PenAtts = new DrawingAttributes(Color.Black); this.m_HighLighterAtts = new HighlighterDrawingAttributes(Color.Orange); this.m_StylusEntrys = new StylusEntry[][] { new StylusEntry[] { new StylusEntry(new DrawingAttributes(Color.Orange), this.m_PenModel, Strings.SelectCustomColorPen, PenType.Pen), new StylusEntry(new HighlighterDrawingAttributes(Color.Pink), this.m_HighlighterModel, Strings.SelectCustomColorHighlighter, PenType.Hightlighter), new StylusEntry(new DrawingAttributes(Color.Orange), this.m_TextModel, Strings.CustomColorText, PenType.Text), }, new StylusEntry[] { new StylusEntry(new DrawingAttributes(Color.Blue), this.m_PenModel, Strings.SelectBluePen, PenType.Pen), new StylusEntry(new HighlighterDrawingAttributes(Color.Cyan), this.m_HighlighterModel, Strings.SelectCyanHighlighter, PenType.Hightlighter), new StylusEntry(new DrawingAttributes(Color.Blue), this.m_TextModel, Strings.BlueText, PenType.Text), }, new StylusEntry[] { new StylusEntry(new DrawingAttributes(Color.Green), this.m_PenModel, Strings.SelectGreenPen, PenType.Pen), new StylusEntry(new HighlighterDrawingAttributes(Color.LawnGreen), this.m_HighlighterModel, Strings.SelectGreenHighlighter, PenType.Hightlighter), new StylusEntry(new DrawingAttributes(Color.Green), this.m_TextModel, Strings.GreenText, PenType.Text), }, new StylusEntry[] { new StylusEntry(new DrawingAttributes(Color.Red), this.m_PenModel, Strings.SelectRedPen, PenType.Pen), new StylusEntry(new HighlighterDrawingAttributes(Color.Magenta), this.m_HighlighterModel, Strings.SelectMagentaHighlighter, PenType.Hightlighter), new StylusEntry(new DrawingAttributes(Color.Red), this.m_TextModel, Strings.RedText, PenType.Text), }, new StylusEntry[] { new StylusEntry(new DrawingAttributes(Color.Yellow), this.m_PenModel, Strings.SelectYellowPen, PenType.Pen), new StylusEntry(new HighlighterDrawingAttributes(Color.Yellow), this.m_HighlighterModel, Strings.SelectYellowHighlighter, PenType.Hightlighter), new StylusEntry(new DrawingAttributes(Color.Yellow), this.m_TextModel, Strings.YellowText, PenType.Text), }, new StylusEntry[] { new StylusEntry(this.m_PenAtts, this.m_PenModel, Strings.SelectBlackPen, PenType.Pen), new StylusEntry(this.m_HighLighterAtts, this.m_HighlighterModel, Strings.SelectOrangeHighlighter, PenType.Hightlighter), new StylusEntry(new DrawingAttributes(Color.Black), this.m_TextModel, Strings.BlackText, PenType.Text), }, }; }