Ejemplo n.º 1
0
        public bool RunFile()
        {
            bool retorno = false;

            this.DSSText.Command = "Compile " + this.FileName;

            this.DSSCircuit = DSSobj.ActiveCircuit;


            this.DSSSolution      = DSSCircuit.Solution;
            this.DSSConttrolQueue = DSSCircuit.CtrlQueue;
            this.DSSCmath         = DSSobj.CmathLib;
            this.DSSPDElement     = DSSCircuit.PDElements;
            this.DSSCktElement    = DSSCircuit.ActiveCktElement;
            this.DSSBus           = DSSCircuit.ActiveBus;
            this.DSSLoads         = DSSCircuit.Loads;
            this.DSSLines         = DSSCircuit.Lines;
            this.DSSLineCodes     = DSSCircuit.LineCodes;

            this.DSSText.Command = "Set Mode = Snapshot";

            retorno = true;

            return(retorno);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns the load data for the load case.
        /// </summary>
        /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception>
        public void FillLoads()
        {
            if (_responseSpectrum == null)
            {
                return;
            }
            _responseSpectrum.GetLoads(Name,
                                       out var loadDirections,
                                       out var functions,
                                       out var scaleFactor,
                                       out var coordinateSystems,
                                       out var angles);

            for (int i = 0; i < loadDirections.Length; i++)
            {
                LoadResponseSpectrum loadFunction = new LoadResponseSpectrum()
                {
                    Function         = functions[i],
                    ScaleFactor      = scaleFactor[i],
                    CoordinateSystem = coordinateSystems[i],
                    Angle            = angles[i],
                    Direction        = loadDirections[i]
                };
                Loads.Add(loadFunction);
            }
        }
Ejemplo n.º 3
0
    /// <summary>
    /// use to show the delivery detail popup
    /// </summary>
    /// <param name="DeliveryID"></param>
    public void LoadPopInfobyDeliveryId(int DeliveryID)
    {
        Delivery objDelivery = new Delivery(DeliveryID);

        lblDeliveryDate.Text           = Conversion.ParseString(objDelivery.DeliveryDate.ToShortDateString());
        lblDeliveryEstimaDateTime.Text = Conversion.ParseString(objDelivery.DeliveryEstimateDates.ToShortDateString());
        lblDeliveryID.Text             = Conversion.ParseString(objDelivery.DeliveryID);
        lblDeliveryName.Text           = Conversion.ParseString(objDelivery.DeliveryName);
        lblShipToidnumber.Text         = Conversion.ParseString(objDelivery.OrganizationShipTo);
        lblTransporterName.Text        = Conversion.ParseString(objDelivery.OrganizationTransporter);
        lblVehicleDetails.Text         = Conversion.ParseString(objDelivery.VehicleDetails);
        lblWeight.Text = objDelivery.Weight.ToString();

        try
        {
            string[] loads = objDelivery.LoadIds.Split(',');
            lblTotalLoads.Text = Conversion.ParseString(loads.Length);
            int count = 0;
            gvAllTire.DataSource = Loads.getTiresInfoByLoadIds(objDelivery.LoadIds, 1, pageSize, out count);
            gvAllTire.DataBind();
            lblLoadTireCount.Text = Conversion.ParseString(count);
        }
        catch (Exception ex)
        {
            new SqlLog().InsertSqlLog(0, "ViewDeliveryReceipt.LoadPopInfobyDeliveryId", ex);
        }
    }
Ejemplo n.º 4
0
    private void GetER()
    {
        if (!Tools.IsNullEmpty(qrCode_str) && qrCode_str.Length > 0)
        {
            share_bitmap = qrCode_str;
            topImage     = PhoneManager.inst.Base64ToTexter2d(share_bitmap);
            erBg.texture = new NTexture(topImage);
        }
        else
        {
            lw = LoaderManager.inst.Load(shareUrl + ".jpg", (object w) => {
                if (this.group == null)
                {
                    return;
                }
                topImage = (Texture2D)w;
                if (topImage != null)
                {
                    if (this.group == null)
                    {
                        return;
                    }
                    erBg.texture = new NTexture(topImage);
                    share_bitmap = Convert.ToBase64String(topImage.EncodeToJPG());
//                    Log.debug("topImage:" + topImage);
//                    Log.debug("erBg" + erBg);
                    LocalStore.SetLocal(LocalStore.LOCAL_QRCODE + userModel.uid, share_bitmap);
                }
            });
        }
    }
Ejemplo n.º 5
0
        public PlotModel GetModel()
        {
            EtkilesimDiyagramHazirlama diagram = new EtkilesimDiyagramHazirlama();

            diagram.ShowAllDiagram     = ShowAllDiagram;
            diagram.ShowRightDiagram   = ShowRightDiagram;
            diagram.ShowLeftDiagram    = ShowLeftDiagram;
            diagram.ShowNominalDiagram = ShowNominalDiagram;
            diagram.ShowGridLines      = ShowGridLines;
            diagram.ShowLoads          = ShowLoads;
            diagram.Code                    = Code;
            diagram.Title                   = Title;
            diagram.SubTitle                = SubTitle;
            diagram.ShowTitle               = ShowTitle;
            diagram.SectionGeometry         = MetrikKesitGeometri();
            diagram.StrengthReductionFactor = new StrengthReductionFactor(PhiA, PhiB, PhiC);
            diagram.Concrete                = Beton();
            diagram.Steel                   = DonatiCeligi();
            diagram.ReinforcingBars         = MetrikDonatiKatmanBilgi();
            diagram.Loads                   = (List <Load>)Loads.Clone();

            PlotModel model = diagram.CreateModel();

            Pmax       = diagram.Pmax;
            Pmin       = diagram.Pmin;
            ActualPmax = diagram.ActualPmax;

            return(model);
        }
Ejemplo n.º 6
0
 public void SetLoadDisplacement(string name,
                                 string loadPattern,
                                 Loads force,
                                 bool replace            = false,
                                 string coordinateSystem = CoordinateSystems.Global,
                                 eItemType itemType      = eItemType.Object)
 {
 }
Ejemplo n.º 7
0
        public static void RemoveLoad(Loadout l)
        {
            Build build = Program.Builds.FirstOrDefault(b => b.ID == l.BuildID);

            BuildsPrintTo?.Invoke(null, PrintToEventArgs.GetEvent(build, "!"));
            l.Unlock();
            Loads.Remove(l);
        }
Ejemplo n.º 8
0
 public void SetLoadForceWithGUID(string name,
                                  string loadPattern,
                                  Loads force,
                                  string GUID,
                                  bool replace            = false,
                                  string coordinateSystem = CoordinateSystems.Global)
 {
 }
Ejemplo n.º 9
0
        public IActionResult SearchName(Loads t)
        {
            var count = t.Count;
            var name  = t.Search;
            var dates = _calendarViewService.SearchGroupByDates(count, name);

            return(Json(dates));
        }
Ejemplo n.º 10
0
        public IActionResult SearchDate(Loads t)
        {
            var skip  = t.Skip;
            var take  = t.Take;
            var date  = t.Date;
            var dates = _calendarViewService.GetGroupByDates(skip, take, date);

            return(Json(dates));
        }
Ejemplo n.º 11
0
        public IActionResult Search(Loads loads)
        {
            var take = loads.Take;
            var skip = loads.Skip;
            var name = loads.Search;
            var data = _documentService.Search(skip, take, name);

            return(Json(data));
        }
Ejemplo n.º 12
0
        public static void AddLoadNodes(TreeNode tn, Element e)
        {
            Loads loads = new Loads(e);

            if (loads.IsValid)
            {
                loads.AddNodes(tn);
            }
        }
Ejemplo n.º 13
0
 public void ToStream(StreamWriter sw)
 {
     sw.WriteLine();
     sw.WriteLine("{0} {1}", TypeNo, Code);
     sw.WriteLine("{0}", Loads.ToString());
     sw.WriteLine("{0}", Distances.ToString());
     sw.WriteLine("{0:f3}", LoadWidth);
     sw.WriteLine();
 }
Ejemplo n.º 14
0
 internal static void ClearLoadouts()
 {
     foreach (Loadout l in Loads)
     {
         Build build = Program.Builds.FirstOrDefault(b => b.ID == l.BuildID);
         BuildsPrintTo?.Invoke(null, PrintToEventArgs.GetEvent(build, "!"));
         l.Unlock();
     }
     Loads.Clear();
 }
Ejemplo n.º 15
0
        public IActionResult SearchWeek(Loads t)
        {
            var skip  = t.Skip;
            var take  = t.Take;
            var week  = int.Parse(t.Week.Split("-")[1]);
            var year  = int.Parse(t.Week.Split("-")[0]);
            var weeks = _calendarViewService.GetGroupByDates(skip, take, week, year);

            return(Json(weeks));
        }
Ejemplo n.º 16
0
 /// <summary>
 /// Clear the selection
 /// </summary>
 public void Clear()
 {
     Elements.Clear();
     Nodes.Clear();
     Loads.Clear();
     SectionFamilies.Clear();
     BuildUpFamilies.Clear();
     Materials.Clear();
     Sets.Clear();
 }
Ejemplo n.º 17
0
    public Corner(Vector3Int index, Grid3d grid)
    {
        _grid    = grid;
        Index    = index;
        Position = grid.Corner + new Vector3(index.x, index.y, index.z) * grid.VoxelSize;

        Location    = new Point(Position.x, Position.z, Position.y);
        Constraints = index.y == 0 ? Constraint.Fixed : Constraint.RotationFixed;
        Loads.Add(new NodalLoad(new Force(0, 0, -2000000, 0, 0, 0)));
    }
Ejemplo n.º 18
0
 /// <summary>
 /// Fills the class with all data from the application.
 /// </summary>
 public override void FillData()
 {
     base.FillData();
     Loads.FillLoads();
     InitialCase.FillInitialCase();
     MassSource.FillMassSource();
     ModalCase.FillModalCase();
     NonlinearSettings.FillData();
     FillResultsSaved();
     FillLoadApplication();
 }
Ejemplo n.º 19
0
    /// <summary>
    /// Load All Pop Info By Load Id on LowCommand Click
    /// </summary>
    /// <param name="loadid"></param>

    public void LoadPopInfobyLoadId(int loadid)
    {
        lblLoadTireCount.Text = Convert.ToString(Loads.getCountLoadByLoadId(loadid));



        DataSet ds = Loads.getLoadTireInfoByLoadId(loadid);

        grvLoadTireInfo.DataSource = ds;
        grvLoadTireInfo.DataBind();
    }
Ejemplo n.º 20
0
        //construtor
        public VoltageLevelAnalysis(Circuit cir, Text txt)
        {
            _circuit  = cir;
            _loadsDSS = cir.Loads;
            _DSSText  = txt;

            _numBarras        = cir.NumBuses;
            _numClientesTotal = _loadsDSS.Count;
            _numClientesDRP   = 0;
            _numClientesDRC   = 0;
            _numClientesIP    = 0;
        }
Ejemplo n.º 21
0
    /// <summary>
    /// use to get the Tire information against the Load Ids
    /// </summary>
    /// <param name="_LoadIds"></param>
    /// <param name="pageNo"></param>
    protected void LoadTireInfoByLoadIds(string _LoadIds, int pageNo)
    {
        dvTire.Visible = true;
        pageSize       = 10;
        //CurrentPageR = pageNo;
        int count = 0;

        gvAllTire.DataSource = Loads.getTiresInfoByLoadIds(_LoadIds, pageNo, pageSize, out count);
        gvAllTire.DataBind();
        //gvAllTire.PageSize = count;
        //this.TotalItemsR = count;
        //this.pgrTiresLoad.DrawPager(pageNo, TotalItemsR, pageSize, MaxPagesToShow);
    }
Ejemplo n.º 22
0
        public RepositoryQuery <T> Load(params string[] navProperty)
        {
            if (navProperty == null)
            {
                throw new ArgumentNullException("navProperty");
            }
            foreach (var expression in navProperty)
            {
                Loads.Add(expression);
            }

            return(this);
        }
Ejemplo n.º 23
0
 internal void Parse(string pattern, Func <string, string> stripFunc)
 {
     foreach (var line in Content.Where(l => l.StartsWith(pattern)).ToList())
     {
         var dirPath = new FileInfo(FilePath).Directory ?? new DirectoryInfo(Directory.GetCurrentDirectory());
         var path    = Path.Combine(dirPath.FullName, stripFunc.Invoke(line));
         Loads.Add(Content.IndexOf(line), new ScriptContent(path));
     }
     foreach (var load in Loads)
     {
         load.Value.Parse(pattern, stripFunc);
     }
 }
Ejemplo n.º 24
0
    protected override void LoadExternal()
    {
//		base.LoadExternal ();
        Texture2D tex = (Texture2D)Resources.Load(this.url, typeof(Texture2D));

        if (tex != null)
        {
            onExternalLoadSuccess(new NTexture(tex));
        }
        else
        {
            w = LoaderManager.inst.Load(this.url, Load_Complete, Load_Error);
        }
    }
Ejemplo n.º 25
0
 //What is the purpose of this method? If someone wanted to clear the Model, they could just create a new one.
 public void Clear()
 {
     Loads.Clear();
     ClustersDictionary.Clear();
     SubdomainsDictionary.Clear();
     ElementsDictionary.Clear();
     NodesDictionary.Clear();
     GlobalDofOrdering = null;
     Constraints.Clear();
     ElementMassAccelerationHistoryLoads.Clear();
     ElementMassAccelerationLoads.Clear();
     MassAccelerationHistoryLoads.Clear();
     MassAccelerationLoads.Clear();
 }
Ejemplo n.º 26
0
        public async Task <ActionResult <Loads> > PostLoads(IList <Loads> loadchannels)
        {
            Loads loadTemp = new Loads();

            foreach (Loads loadChannelDeviceMap in loadchannels)
            {
                loadChannelDeviceMap.LoadId = Guid.NewGuid().ToString();
                _context.Loads.Add(loadChannelDeviceMap);
                loadTemp = loadChannelDeviceMap;
            }
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetLoad", new { id = loadTemp.LoadId }, loadTemp));
        }
        async Task ExecuteRefreshCommand(bool forceRefresh)
        {
            if (IsBusy)
            {
                return;
            }

            if (!await CheckConnectivityAsync())
            {
                return;
            }

            IsBusy = true;

            try
            {
                await Task.Run(async() =>
                {
                    string userSignInString = _userEmail;
                    if (String.IsNullOrWhiteSpace(_userEmail))
                    {
                        userSignInString = _userPhoneNumber;
                    }
                    IQueryable <Shippingorder_Mobilesearch> loads = App.soapService.GetAll(userSignInString).ShippingOrder_MobileSearch.AsQueryable();

                    if (loads != null && loads.Count() > 0)
                    {
                        Loads.ReplaceRange(loads.AsEnumerable());
                    }
                    else if (loads != null && loads.Count() == 0)
                    {
                        await PageService.DisplayAlert("No Loads", "There are no loads assigned to or viewable by '" + userSignInString + "'.  Please contact Citation Logistics about your loads.", "OK");
                    }
                    else
                    {
                        await PageService.DisplayAlert("Error Getting Loads", "There was an error getting the loads.", "OK");
                    }
                });
            }
            catch (Exception ex)
            {
                Crashes.TrackError(ex);
                System.Diagnostics.Debug.WriteLine($"*** ERROR: {ex.Message}");
            }
            finally
            {
                IsBusy = false;
            }
        }
Ejemplo n.º 28
0
        public JsonResult GetLoads(Loads t)
        {
            var skip = t.Skip;
            var take = t.Take;
            var tw   = DateTime.Today.DayOfWeek.ToString();
            //var ch = _calendarViewService.LoadsGroupByWeeks(t.Skip, t.Take);
            var dates = _calendarViewService.GetGroupByDates(skip, take);

            //var dates1 = _calendarViewService.GetGroupByDates(skip, take,DateTime.Today);
            //var weeks = _calendarViewService.GetGroupByDates(skip, take, 44);
            //var weeks1 = _calendarViewService.GetGroupByDates(skip, take, 43);

            //var kt = t.Take.Equals(0) ? _calendarViewService.GetDays() : _calendarViewService.GetLoad(t.Skip, t.Take);

            return(Json(dates));
        }
Ejemplo n.º 29
0
    protected void LoadsInfo(int pageNo)
    {
        pageSize             = 25;// Convert.ToInt32(ddlloadsinfo.SelectedValue);
        gvloadsinfo.PageSize = pageSize;
        CurrentPageR         = pageNo;
        DateTime frmDate = string.IsNullOrEmpty(txtFrmDate.Text) ? DateTime.MinValue : Convert.ToDateTime(txtFrmDate.Text);
        DateTime toDate  = string.IsNullOrEmpty(txtToDate.Text) ? DateTime.MinValue : Convert.ToDateTime(txtToDate.Text);

        int count = 0;

        gvloadsinfo.DataSource = Loads.loadsInfo(pageNo, pageSize, out count, txtUserName.Text.Trim(), frmDate, toDate, UserOrganizationId, Conversion.ParseInt(ddlLoadStatus.SelectedValue), null, CatId);
        gvloadsinfo.DataBind();

        this.TotalItemsR = count;
        this.pgrLoad.DrawPager(pageNo, TotalItemsR, pageSize, MaxPagesToShow);
    }
Ejemplo n.º 30
0
        public double Get_Maximum_Load()
        {
            double max = 0;

            for (int i = 0; i < Loads.Count; i++)
            {
                try
                {
                    if (max <= Loads.GetDouble(i))
                    {
                        max = Loads.GetDouble(i);
                    }
                }
                catch (Exception ex) { }
            }
            return(max);
        }