コード例 #1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,FirstName,LastName")] Illustrator illustrator)
        {
            if (id != illustrator.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(illustrator);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!IllustratorExists(illustrator.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(illustrator));
        }
コード例 #2
0
 public GraphicNovel(Author author, Illustrator illustrator, Publisher publisher, string title)
 {
     Author      = author;
     Illustrator = illustrator;
     Publisher   = publisher;
     Title       = title;
 }
コード例 #3
0
 public Book(Writer writer, Illustrator illustrator, Publisher publisher, string title, uint costPrice)
 {
     Writer        = writer;
     Illustrator   = illustrator;
     Publisher     = publisher;
     Title         = title;
     CostPrice     = costPrice;
     Illustrations = new List <Illustration>();
     Text          = new Text();
 }
コード例 #4
0
        public async Task <IActionResult> Create([Bind("Id,FirstName,LastName")] Illustrator illustrator)
        {
            if (ModelState.IsValid)
            {
                _context.Add(illustrator);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(illustrator));
        }
コード例 #5
0
 public void FillKnowledge(CandidateViewModel candidate)
 {
     _driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
     Ionic.EnterText(candidate.Ionic.ToString());
     Android.EnterText(candidate.Android.ToString());
     Angular.EnterText(candidate.Angular.ToString());
     Asp.EnterText(candidate.Asp.ToString());
     Others.EnterText(candidate.Others);
     Photoshop.EnterText(candidate.Photoshop.ToString());
     Illustrator.EnterText(candidate.Illustrator.ToString());
     Html.EnterText(candidate.Html.ToString());
     Jquery.EnterText(candidate.Jquery.ToString());
 }
コード例 #6
0
ファイル: BaseBookFactory.cs プロジェクト: Weiaett/dotNetLabs
        /// <summary>
        /// Создание книги
        /// </summary>
        /// <param name="writerName">Имя писателя</param>
        /// <param name="illustratorName">Имя иллюстратора</param>
        /// <param name="publisherName">Имя издателя</param>
        /// <param name="title">Название книги</param>
        /// <returns></returns>
        public Book MakeBook(string writerName, string illustratorName, string publisherName, string title)
        {
            Console.WriteLine($"Начата книга {title}");
            Writer      writer      = new Writer(writerName);
            Illustrator illustrator = new Illustrator(illustratorName);
            Publisher   publisher   = new Publisher(publisherName);
            Book        book        = new Book(writer, illustrator, publisher, title, CostPrice);
            Random      random      = new Random();

            for (int i = 0; i < random.Next(1, 6); i++)
            {
                writer.MakeBook(book);
                illustrator.MakeBook(book);
            }
            publisher.MakeBook(book);
            Console.WriteLine($"Закончена книга {title}");
            Console.WriteLine();
            return(book);
        }
コード例 #7
0
ファイル: BaseBookFactory.cs プロジェクト: Weiaett/dotNetLabs
        /// <summary>
        /// Создание книги
        /// </summary>
        /// <param name="writerName">Имя писателя</param>
        /// <param name="illustratorName">Имя иллюстратора</param>
        /// <param name="publisherName">Имя издателя</param>
        /// <param name="title">Название книги</param>
        /// <returns></returns>
        public Book MakeBook(string writerName, string illustratorName, string publisherName, string title)
        {
            //Console.WriteLine($"Начата книга {title}");
            Writer <Salary>      writer      = new Writer <Salary>(writerName);
            Illustrator <Salary> illustrator = new Illustrator <Salary>(illustratorName);
            Publisher <Salary>   publisher   = new Publisher <Salary>(publisherName);
            Book book = new Book(writer, illustrator, publisher, title, CostPrice);

            Logger?.Subscribe(book);
            Random random = new Random();

            for (int i = 0; i < random.Next(1, 6); i++)
            {
                writer.MakeBook(book);
                illustrator.MakeBook(book);
            }
            publisher.MakeBook(book);
            //Console.WriteLine($"Закончена книга {title}");
            //Console.WriteLine();
            return(book);
        }
コード例 #8
0
        internal FormBeamBox()
        {
            InitializeComponent();

            if (FormBeamBox.beamBoxData == null)
                return;

            //----------ͼ����ʾ---------------------------
            M_Illustrator = new Illustrator();
            Size size = groupBoxPic.ClientSize;
            M_Illustrator.Size = size;
            groupBoxPic.Controls.Add(M_Illustrator);
            IllustratorTool.LoadPic(M_Illustrator, "����ͼ-С����");
            //----------ͼ����ʾ---------------------------

            comboBox1.SelectedIndex = 0;
            BeamBoxBlock beamBoxBlock = new BeamBoxBlock();
            beamBoxData.GetBlock(ref beamBoxBlock, 0);

            textBox1.Text = beamBoxBlock.M_glWidth1.ToString();
            textBox2.Text = beamBoxBlock.M_glWidth2.ToString();
            textBox3.Text = beamBoxBlock.DimSideOffset.ToString();
            textBox27.Text = beamBoxBlock.DimUpOffset.ToString();
            textBox28.Text = beamBoxBlock.DimDownOffset.ToString();
            textBox4.Text = beamBoxBlock.M_initWone.ToString();
            textBox16.Text = beamBoxBlock.M_initWsjf.ToString();
            textBox6.Text = beamBoxBlock.WidthOffsetL.ToString();
            textBox7.Text = beamBoxBlock.WidthOffsetR.ToString();
            textBox8.Text = beamBoxBlock.WidthOffsetSjfL.ToString();
            textBox9.Text = beamBoxBlock.WidthOffsetSjfR.ToString();
            checkBox1.Checked = beamBoxBlock.IsDrawHorizon;
            checkBox2.Checked = beamBoxBlock.UseTextOffset;
            textBoxScale.Text = beamBoxBlock.DimScale.ToString();
            comboBox2.SelectedIndex = (int)beamBoxBlock.StructType;
            checkBox4.Checked = beamBoxBlock.IsUserhgbCount;
            checkBox5.Checked = beamBoxBlock.IsDrawDimension;
            checkBox6.Checked = beamBoxBlock.IsDrawBeam;
            checkBox7.Checked = beamBoxBlock.IsDimItalia;
            checkBox3.Checked = beamBoxBlock.IsAdjustSJFW;
            checkBox8.Checked = beamBoxBlock.IsDrawSupport;
            checkBox9.Checked = beamBoxBlock.IsSupportRound;
            checkBox10.Checked = beamBoxBlock.IsDimXb_ByBeamCenter;
            checkBox11.Checked = beamBoxBlock.IsDimZZDistOnBeam;
            textBox10.Text = beamBoxBlock.M_hgbCount.ToString();
            //�������۶���
            textBox17.Text = beamBoxBlock.M_initWsideLS.ToString();
            textBox18.Text = beamBoxBlock.M_initWsideLX.ToString();
            textBox19.Text = beamBoxBlock.M_initWsideRS.ToString();
            textBox20.Text = beamBoxBlock.M_initWsideRX.ToString();
            //---֧����Ϣ
            textBox21.Text = beamBoxBlock.SupportOffsetL.ToString();
            textBox22.Text = beamBoxBlock.SupportOffsetR.ToString();
            textBox23.Text = beamBoxBlock.SupportDistOnBeam.ToString();
            textBox24.Text = beamBoxBlock.SupportDiameter.ToString();
            textBox25.Text = beamBoxBlock.GailiangInSide.ToString();
            textBox26.Text = beamBoxBlock.GailiangOutSide.ToString();

            comboBox1.SelectedIndex = 0;
            if (beamBoxBlock.M_drawScale == 1000)
                comboBox1.SelectedIndex = 0;
            else if (beamBoxBlock.M_drawScale == 1)
                comboBox1.SelectedIndex = 1;

            //this.ShowDataOnGrid();
            UpdateGridData();
            this.checkBox2_CheckedChanged(null, null);
            this.checkBox6_CheckedChanged(null, null);
            this.checkBox8_CheckedChanged(null, null);
            MouseEventHandler curEvent = new System.Windows.Forms.MouseEventHandler(this.textBox_MouseClick);
            AcadAssist.AttrachFormEvent(this, curEvent);
        }
コード例 #9
0
 public BookIllustrator(IllustratedBook book, Illustrator illustrator)
 {
     Book        = book;
     Illustrator = illustrator;
 }