Exemple #1
0
 static void Main(string[] args)
 {
     TypesSample.Demo();
     TypeCastingSample.Demo();
     ReferenceParametersSample.Demo();
     ClassSample.Demo();
     StaticClassSample.Demo();
     ArgumentsSample.Demo();
     SimpleInheritance.Demo();
     InheritanceSample.Demo();
     SealedSample.Demo();
     AbstractSample.Demo();
     InterfaceInheritanceSample.Demo();
     InterfaceInheritanceDISample.Demo();
     ListSample.Demo();
     DictionarySample.Demo();
 }
Exemple #2
0
        private static void Main(string[] args)
        {
            Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");

            //Paragraphs
            ParagraphSample.SimpleFormattedParagraphs();
            ParagraphSample.ForceParagraphOnSinglePage();
            ParagraphSample.ForceMultiParagraphsOnSinglePage();
            ParagraphSample.TextActions();
            ParagraphSample.Heading();

            ////Document
            DocumentSample.AddCustomProperties();
            DocumentSample.ReplaceText();
            DocumentSample.ApplyTemplate();
            DocumentSample.AppendDocument();

            //Images
            ImageSample.AddPicture();
            ImageSample.CopyPicture();
            ImageSample.ModifyImage();

            //Indentation/Direction/Margins
            MarginSample.SetDirection();
            MarginSample.Indentation();
            MarginSample.Margins();

            //Header/Footers
            HeaderFooterSample.HeadersFooters();

            //Tables
            TableSample.InsertRowAndImageTable();
            TableSample.TextDirectionTable();
            TableSample.CreateRowsFromTemplate();
            TableSample.ColumnsWidth();
            TableSample.MergeCells();

            //Hyperlink
            HyperlinkSample.Hyperlinks();

            //Section
            SectionSample.InsertSections();

            //Lists
            ListSample.AddList();

            //Equations
            EquationSample.InsertEquation();

            //Bookmarks
            BookmarkSample.InsertBookmarks();
            BookmarkSample.ReplaceText();

            //Charts
            ChartSample.BarChart();
            ChartSample.LineChart();
            ChartSample.PieChart();
            ChartSample.Chart3D();

            //Tale of Content
            TableOfContentSample.InsertTableOfContent();
            TableOfContentSample.InsertTableOfContentWithReference();

            //Lines
            LineSample.InsertHorizontalLine();

            //Protection
            ProtectionSample.AddPasswordProtection();
            ProtectionSample.AddProtection();

            //Parallel
            ParallelSample.DoParallelActions();

            //Others
            MiscellaneousSample.CreateRecipe();
            MiscellaneousSample.CompanyReport();
            MiscellaneousSample.CreateInvoice();

            Console.WriteLine("\nPress any key to exit.");
            Console.ReadKey();
        }
Exemple #3
0
        public NotePanel(UILogic uiLogic, TimeSpan creationTime)
            : base(uiLogic, null, creationTime)
        {
            Alive = true;
            Visible = true;
            Context.NextCellNote = Context.SelectedCell;

            leftPartWidth = 350f;// 0.3f * UI.GameEngine.Render.ScreenWidth;
            Rec = new Rectangle(0, (int)(0.6f * UI.GameEngine.Render.ScreenHeight), (int)UI.GameEngine.Render.ScreenWidth, (int)(0.4f * UI.GameEngine.Render.ScreenHeight));

            keyboard = new Keyboard(this, UI, GetNewTimeSpan());
            ListUIChildren = new List<UIComponent>();
            ListUIChildren.Add(keyboard);

            //--- Boutons
            Vector2 vec = new Vector2(0, Rec.Top + MARGE);

            ClickableText txtSilence = new ClickableText(UI, this, GetNewTimeSpan(), Render.FontTextSmall, "Silence", new Vector2(MARGE, vec.Y), VisualStyle.ForeColor, VisualStyle.ForeColor, VisualStyle.BackColorLight, VisualStyle.BackForeColorMouseOver, false);
            txtSilence.ClickText += new ClickableText.ClickTextHandler(txtSilence_ClickText);
            ListUIChildren.Add(txtSilence);
            vec.Y += MARGE + txtSilence.Rec.Height;

            ClickableText txtCapture = new ClickableText(UI, this, GetNewTimeSpan(), Render.FontTextSmall, "Capture", new Vector2(MARGE, vec.Y), VisualStyle.ForeColor, VisualStyle.ForeColor, VisualStyle.BackColorLight, VisualStyle.BackForeColorMouseOver, false);
            txtCapture.ClickText += new ClickableText.ClickTextHandler(txtCapture_ClickText);
            ListUIChildren.Add(txtCapture);
            vec.Y += MARGE + txtCapture.Rec.Height;

            ClickableText txtEntrainement = new ClickableText(UI, this, GetNewTimeSpan(), Render.FontTextSmall, "Entraînement", new Vector2(MARGE, vec.Y), VisualStyle.ForeColor, VisualStyle.ForeColor, VisualStyle.BackColorLight, VisualStyle.BackForeColorMouseOver, true);
            txtEntrainement.ClickText += new ClickableText.ClickTextHandler(txtEntrainement_ClickText);
            ListUIChildren.Add(txtEntrainement);
            vec.Y += MARGE + txtEntrainement.Rec.Height;

            ClickableText txtOpenMidi = new ClickableText(UI, this, GetNewTimeSpan(), Render.FontTextSmall, "Midi", new Vector2(MARGE, vec.Y), VisualStyle.ForeColor, VisualStyle.ForeColor, VisualStyle.BackColorLight, VisualStyle.BackForeColorMouseOver, false);
            txtOpenMidi.ClickText += new ClickableText.ClickTextHandler(txtOpenMidi_ClickText);
            ListUIChildren.Add(txtOpenMidi);
            vec.Y += MARGE + txtOpenMidi.Rec.Height;
            //---

            //--- Note duration
            CreateNoteDurationMenu();
            //---

            //--- Channel
            CreateChannelMenu();
            //---

            //--- Liste des samples
            listSample = new ListSample(UI,this, GetNewTimeSpan(), null, Context.Map.Channels[1],
                new Rectangle(MARGE + (int)leftPartWidth / 2, Rec.Top + Rec.Height / 2 + MARGE, (int)leftPartWidth / 2-MARGE*2, Rec.Height / 2-MARGE*2)
                , Render.FontTextSmall, true);
            listSample.SelectedItemChanged += new ListBase.SelectedItemChangedHandler(listSample_SelectedItemChanged);
            ListUIChildren.Add(listSample);
            //---

            //---
            KeyManager keyClose = AddKey(Keys.Escape);
            keyClose.KeyReleased += new KeyManager.KeyReleasedHandler(keyClose_KeyReleased);
            //---

            //---
            MouseManager mouseLeftButton = AddMouse(MouseButtons.LeftButton);
            mouseLeftButton.MouseFirstPressed += new MouseManager.MouseFirstPressedHandler(mouseIgnoreActionFirstPressed);
            //mouseLeftButton.MousePressed += new MouseManager.MousePressedHandler(mouseIgnoreAction);
            mouseLeftButton.MouseReleased += new MouseManager.MouseReleasedHandler(mouseIgnoreAction);

            MouseManager mouseRightButton = AddMouse(MouseButtons.RightButton);
            mouseRightButton.MouseFirstPressed += new MouseManager.MouseFirstPressedHandler(mouseIgnoreActionFirstPressed);
            //mouseRightButton.MousePressed += new MouseManager.MousePressedHandler(mouseIgnoreAction);
            mouseRightButton.MouseReleased += new MouseManager.MouseReleasedHandler(mouseIgnoreAction);
            //---

            Context.SelectedCellChanged += new Context.SelectedCellChangedHandler(Context_SelectedCellChanged);
        }